Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 34 |
-
answer =
|
| 35 |
-
|
|
|
|
| 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"
|