Tuana commited on
Commit
0ce51a9
·
1 Parent(s): 8f0c517

Answer to dict

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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].json())
32
- st.write(prediction['answers'][1].json())
33
- st.write(prediction['answers'][2].json())
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)