iamviveksrk commited on
Commit
bd2f707
β€’
1 Parent(s): f2fae48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,7 +68,7 @@ def ask_question(query):
68
  "link":None,
69
  "context": None,
70
  "answer": None,
71
- "relevance": round(answer["score"] * 100, 2),
72
  }
73
  )
74
  return results
@@ -93,7 +93,7 @@ if st.session_state.results:
93
  markdown(context[:start_idx] + str(annotation(body=answer, label="RELEVANT", background="#964448", color='#ffffff')) + context[end_idx:]),
94
  unsafe_allow_html=True,
95
  )
96
- st.markdown(f"**Title:** [{result['title']}]({result['link']})\n**Relevance:** {result['relevance']}")
97
  else:
98
  st.info(
99
  "πŸ€”    Haystack is unsure whether any of the documents contain an answer to your question. Try to reformulate it!"
 
68
  "link":None,
69
  "context": None,
70
  "answer": None,
71
+ "score": round(answer["score"] * 100, 2),
72
  }
73
  )
74
  return results
 
93
  markdown(context[:start_idx] + str(annotation(body=answer, label="RELEVANT", background="#964448", color='#ffffff')) + context[end_idx:]),
94
  unsafe_allow_html=True,
95
  )
96
+ st.markdown(f"**Title:** [{result['title']}]({result['link']})\n**Relevance:** {result['score']}")
97
  else:
98
  st.info(
99
  "πŸ€”    Haystack is unsure whether any of the documents contain an answer to your question. Try to reformulate it!"