Spaces:
Sleeping
Sleeping
Vishnu-add
commited on
Commit
•
e6d6c2e
1
Parent(s):
534f681
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ def process_answer(instruction):
|
|
69 |
|
70 |
# Display conversation history using Streamlit messages
|
71 |
def display_conversation(history):
|
72 |
-
st.write(history)
|
73 |
for i in range(len(history["generated"])):
|
74 |
message(history["past"][i] , is_user=True, key= str(i) + "_user")
|
75 |
if isinstance(history["generated"][i],str):
|
@@ -81,7 +81,8 @@ def display_conversation(history):
|
|
81 |
for source in history["generated"][i][1]['source_documents']:
|
82 |
# st.write(source.metadata['source'])
|
83 |
sources_list.append(source.metadata['source'])
|
84 |
-
|
|
|
85 |
|
86 |
def main():
|
87 |
# Search with pdf code
|
|
|
69 |
|
70 |
# Display conversation history using Streamlit messages
|
71 |
def display_conversation(history):
|
72 |
+
# st.write(history)
|
73 |
for i in range(len(history["generated"])):
|
74 |
message(history["past"][i] , is_user=True, key= str(i) + "_user")
|
75 |
if isinstance(history["generated"][i],str):
|
|
|
81 |
for source in history["generated"][i][1]['source_documents']:
|
82 |
# st.write(source.metadata['source'])
|
83 |
sources_list.append(source.metadata['source'])
|
84 |
+
# Uncomment below line to display sources
|
85 |
+
# message(str(set(sources_list)) , key="source_"+str(i))
|
86 |
|
87 |
def main():
|
88 |
# Search with pdf code
|