SarkaarSamjho / app.py
Saitejas21's picture
Upload folder using huggingface_hub
526f10b verified
raw
history blame contribute delete
571 Bytes
import gradio as gr
# Function to get the response from your query engine
def get_response(prompt):
response = query_engine.query(prompt) # Call your query engine here
return response
# Gradio interface
def chatbot(prompt):
response = get_response(prompt)
return "", response
# Create the Gradio app
iface = gr.Interface(
fn=chatbot,
inputs=gr.Textbox(lines=7, label="You"),
outputs=[
gr.Textbox(label="Bot"),
gr.Textbox(),
],
title="Chatbot",
description="Ask me anything!",
)
# Launch the app
iface.launch()