Spaces:
Runtime error
Runtime error
Jorge Henao
commited on
Commit
•
8549235
1
Parent(s):
c27d381
Page inclusion
Browse files
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']])
|
29 |
|
30 |
return result
|
31 |
|
@@ -73,7 +73,7 @@ if __name__ == "__main__":
|
|
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})")
|
76 |
-
st.caption(f"Fuente: {answer[4]} - Capítulo: {answer[3]}")
|
77 |
|
78 |
st.markdown("---")
|
79 |
else:
|
|
|
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'], item.meta['page']])
|
29 |
|
30 |
return result
|
31 |
|
|
|
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})")
|
76 |
+
st.caption(f"Fuente: {answer[4]} - Capítulo: {answer[3]} - Página: {answer[4]}")
|
77 |
|
78 |
st.markdown("---")
|
79 |
else:
|