zakerytclarke commited on
Commit
4dcc069
·
verified ·
1 Parent(s): 950465b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -51,9 +51,12 @@ def handle_chat(user_input, teapot_ai):
51
  documents = [desc.replace('<strong>','').replace('</strong>','') for _, desc, _ in results]
52
  print(documents)
53
 
54
- for document in documents:
55
- st.sidebar.write(f"## {documents}")
56
- st.write("---")
 
 
 
57
 
58
  context = "\n".join(documents)
59
  prompt = "You are Teapot, an open-source AI assistant optimized for low-end devices, providing short, accurate responses without hallucinating while excelling at information extraction and text summarization."
 
51
  documents = [desc.replace('<strong>','').replace('</strong>','') for _, desc, _ in results]
52
  print(documents)
53
 
54
+ for (title, description, url) in results:
55
+ # Display Results
56
+ st.sidebar.write(f"## {title}")
57
+ st.sidebar.write(f"{description}")
58
+ st.sidebar.write(f"[Source]({url})")
59
+ st.sidebar.write("---")
60
 
61
  context = "\n".join(documents)
62
  prompt = "You are Teapot, an open-source AI assistant optimized for low-end devices, providing short, accurate responses without hallucinating while excelling at information extraction and text summarization."