RAG-Test / app.py
satendra4u2022's picture
Update app.py
95c4eda verified
raw
history blame
519 Bytes
import gradio as gr
from query_data import main # Importing the main function from query_data.py
import os
#enviroment variables
os.environ['DISABLE_NEST_ASYNCIO'] = 'True'
def run_app(query_text):
# Call the main function from query_data.py
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()