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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,8 +31,8 @@ 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")
 
31
 
32
  def predict(question):
33
  prediction = pipeline.run(question)
34
+ answer = prediction["answers"]
35
+ faq_response = "FAQ Question: " + prediction["query"] + "Answer: " + answer[0].answer
36
  return faq_response
37
 
38
  input_question =gr.inputs.Textbox(label="enter your monopoly question here")