import gradio as gr from query_data import main # Importing the main function from query_data.py import os import subprocess def run_app(query_text): # Call the main function from query_data.py subprocess.run(["pip", "uninstall", "-y", 'uvloop']) response_text = main(query_text) return response_text gr.Interface( run_app, inputs=gr.Textbox(lines=2, label="Query"), outputs=gr.Textbox(lines=5, label="Response", placeholder="Chatbot response will appear here..."), title="Test", ).launch()