Spaces:
Sleeping
Sleeping
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() | |