malte commited on
Commit
b0c0195
1 Parent(s): 892aae2

add link to source from webretriever

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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)