Issafre commited on
Commit
4269c77
1 Parent(s): 5ae711f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def gradinterface(query, history):
4
+ # Assuming db and chain are already defined
5
+ docs = db.similarity_search(query)
6
+ response=chain.run(input_documents=docs, question=query)
7
+ return response
8
+
9
+ demo = gr.ChatInterface(fn=gradinterface, title='Fourseason Hotel')
10
+
11
+
12
+
13
+ if __name__ == "__main__":
14
+ demo.launch()