Spaces:
Runtime error
Runtime error
add link to source from webretriever
Browse files
app.py
CHANGED
@@ -52,4 +52,7 @@ if st.session_state.get('query') and run_pressed:
|
|
52 |
src = answers_2['invocation_context']['documents'][0].content.replace("$", "\$")
|
53 |
split_marker = "\n\n" if "\n\n" in src else "\n"
|
54 |
src = " ".join(src.split(split_marker))[0:2000] + "..."
|
|
|
|
|
|
|
55 |
st.write(src)
|
|
|
52 |
src = answers_2['invocation_context']['documents'][0].content.replace("$", "\$")
|
53 |
split_marker = "\n\n" if "\n\n" in src else "\n"
|
54 |
src = " ".join(src.split(split_marker))[0:2000] + "..."
|
55 |
+
if answers_2['invocation_context']['documents'][0].meta.get('link'):
|
56 |
+
title = answers_2['invocation_context']['documents'][0].meta.get('link')
|
57 |
+
src = '"' + title + '": ' + src
|
58 |
st.write(src)
|