Spaces:
Running
Running
Download app.py from Issafre/fourseasons: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/spaces/Issafre/fourseasons/resolve/main/app.py
- Command line
-
hf download hf://spaces/Issafre/fourseasons/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Issafre/fourseasons/resolve/main/app.py
344 Bytes
| import gradio as gr | |
| def gradinterface(query, history): | |
| # Assuming db and chain are already defined | |
| docs = db.similarity_search(query) | |
| response=chain.run(input_documents=docs, question=query) | |
| return response | |
| demo = gr.ChatInterface(fn=gradinterface, title='Fourseason Hotel') | |
| if __name__ == "__main__": | |
| demo.launch() | |