# Description: This file is used to run the application.
# =======================================================
import argparse
import os
# Run the application
def run_application(args):
# Get the Argument name type
type = args.type
# Check the value of type(If type == gradio, run gradio_interface.py)
if type == 'gradio':
# Run file gradio_interface.py
os.system('python gradio_interface.py')
elif type == 'whatsapp':
# Run file whatsapp.py
os.system('python app.py')
elif type == 'twilio':
# Run file whatsapp_twilio.py
os.system('python whatsapp_twilio.py')
else:
# Print error message
print('Invalid type. Please enter gradio or whatsapp or twilio type.')
if __name__ == '__main__':
# Create an argument parser
parser = argparse.ArgumentParser()
# Add the arguments to the parser
parser.add_argument('--type', type=str, default='input', help='input folder')
# Parse the arguments
args = parser.parse_args()
# Run the application
run_application(args)