Timjo88 commited on
Commit
f291d33
Β·
1 Parent(s): b8e7924

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"]
35
- faq_response = "FAQ Question: " + prediction["query"] + "\n"+"Answer: " + answer[0].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"][0].meta
35
+ faq_response = "FAQ Question: " + answer["query"] + "\n"+"Answer: " + answer["answer"]
36
  return faq_response
37
 
38
  input_question =gr.inputs.Textbox(label="enter your monopoly question here")