Spaces:
Runtime error
Runtime error
Download app.py from Saitejas21/SarkaarSamjho: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/spaces/Saitejas21/SarkaarSamjho/resolve/main/app.py
- Command line
-
hf download hf://spaces/Saitejas21/SarkaarSamjho/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Saitejas21/SarkaarSamjho/resolve/main/app.py
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() | |