AhmedEwis commited on
Commit
cb16f87
1 Parent(s): 927aaa2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -629,9 +629,10 @@ chain = load_chain("lc://chains/vector-db-qa/stuff/chain.json", vectorstore=vect
629
  def run_chain(query):
630
  return chain.run(query)
631
 
632
- iface = gr.Interface(fn=run_chain, inputs="text", outputs="text",
633
- title="The following is a conversation with a human called Shegardi. Shegardi is helpful, precise, truthful, and very friendly. Also, Shegardi is an employee of Warba Bank, located in Kuwait. Shegardi will only use the information provided to him. ",
634
- description="Enter a question and get an answer from Shegardi.")
635
 
636
- iface.launch(share=True)
 
637
 
 
 
629
  def run_chain(query):
630
  return chain.run(query)
631
 
632
+ inputs = gr.inputs.Textbox(lines=1, label="Enter your Question:")
633
+ outputs = gr.outputs.Textbox(label="Answer:")
 
634
 
635
+ def run_app(input):
636
+ return run_chain(input)
637
 
638
+ gr.Interface(fn=run_app, inputs=inputs, outputs=outputs, title="The following is a conversation with a human called Shegardi. Shegardi is helpful, precise, truthful, and very friendly. Also, Shegardi is an employee of Warba Bank, located in Kuwait. Shegardi will only use the information provided to him.").launch(share=True)