Jorge Henao commited on
Commit
a542243
1 Parent(s): aa656f2
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -25,7 +25,7 @@ def search(question, retriever_top_k, reader_top_k):
25
  result = []
26
  for i in range(0, len(query_result)):
27
  item = query_result[i]
28
- result.append([[i+1], item.answer, item.context[:200], item.meta['title'], item.meta['source'], int(item.meta['page']) +1 ])
29
 
30
  return result
31
 
@@ -69,7 +69,7 @@ if __name__ == "__main__":
69
  # cropped answer
70
  doc = answer[2][:250] + "..."
71
  # and url to the full answer
72
- url = f"https://www.comisiondelaverdad.co/sites/default/files/descargables/2022-06/Informe%20Final%20capi%CC%81tulo%20Hallazgos%20y%20recomendaciones.pdf#page={answer[5]}"
73
  # then we display it
74
  #st.markdown(f'{doc}\n<br>Fuente: {answer[4]}\n<br>Capítulo: {answer[3]}\n<br>Página: {answer[5]}\n[**Lee más aquí**]({url})\n', unsafe_allow_html=True)
75
  st.markdown(f"{doc}[**Lee más aquí**]({url})")
 
25
  result = []
26
  for i in range(0, len(query_result)):
27
  item = query_result[i]
28
+ result.append([[i+1], item.answer, item.context[:200], item.meta['title'], item.meta['source'], int(item.meta['page'])])
29
 
30
  return result
31
 
 
69
  # cropped answer
70
  doc = answer[2][:250] + "..."
71
  # and url to the full answer
72
+ url = f"https://www.comisiondelaverdad.co/sites/default/files/descargables/2022-06/Informe%20Final%20capi%CC%81tulo%20Hallazgos%20y%20recomendaciones.pdf#page={answer[5]+1}"
73
  # then we display it
74
  #st.markdown(f'{doc}\n<br>Fuente: {answer[4]}\n<br>Capítulo: {answer[3]}\n<br>Página: {answer[5]}\n[**Lee más aquí**]({url})\n', unsafe_allow_html=True)
75
  st.markdown(f"{doc}[**Lee más aquí**]({url})")