Spaces:
Running
Running
Answer to dict
Browse files
app.py
CHANGED
@@ -28,9 +28,9 @@ load_and_write_data()
|
|
28 |
|
29 |
def ask_question(question):
|
30 |
prediction = pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
|
31 |
-
st.write(prediction['answers'][0].
|
32 |
-
st.write(prediction['answers'][1].
|
33 |
-
st.write(prediction['answers'][2].
|
34 |
|
35 |
if question:
|
36 |
ask_question(question)
|
|
|
28 |
|
29 |
def ask_question(question):
|
30 |
prediction = pipeline.run(query=question, params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
|
31 |
+
st.write(prediction['answers'][0].to_dict())
|
32 |
+
st.write(prediction['answers'][1].to_dict())
|
33 |
+
st.write(prediction['answers'][2].to_dict())
|
34 |
|
35 |
if question:
|
36 |
ask_question(question)
|