Timjo88 commited on
Commit
f821944
Β·
1 Parent(s): 21d8737

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -30,9 +30,10 @@ def load_data_to_store(document_store, retriever):
30
  pipeline = start_haystack()
31
 
32
  def predict(question):
33
- predictions = pipeline.run(question)
34
- answer = predictions["answers"]
35
- return answer
 
36
 
37
  input_question =gr.inputs.Textbox(label="enter your monopoly question here")
38
  response = "text"
 
30
  pipeline = start_haystack()
31
 
32
  def predict(question):
33
+ prediction = pipeline.run(question)
34
+ answer = prediction["answers"].to_dict()
35
+ faq_response = "FAQ Question: " + answer["context"] + "Answer: " + answer["answer"]
36
+ return faq_response
37
 
38
  input_question =gr.inputs.Textbox(label="enter your monopoly question here")
39
  response = "text"