Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# app.py -
|
| 2 |
|
| 3 |
# STREAMLIT:
|
| 4 |
# https://www.datacamp.com/tutorial/streamlit:
|
|
@@ -250,7 +250,7 @@ if prompt:
|
|
| 250 |
start = time.process_time()
|
| 251 |
response = retrieval_chain.invoke({"input": prompt})
|
| 252 |
# print(f"Response time: {time.process_time() - start}")
|
| 253 |
-
st.write(f"Response time: {time.process_time() - start}")
|
| 254 |
|
| 255 |
st.write(response["answer"])
|
| 256 |
|
|
@@ -260,7 +260,7 @@ if prompt:
|
|
| 260 |
for i, doc in enumerate(response["context"]):
|
| 261 |
# print(doc)
|
| 262 |
# st.write(f"Source Document # {i+1} : {doc.metadata['source'].split('/')[-1]}")
|
| 263 |
-
|
| 264 |
st.write(f"Source Document # {i+1} : {doc.metadata['source'].split('/')[-1]}")
|
| 265 |
|
| 266 |
|
|
|
|
| 1 |
+
# app.py - 21-03-2024
|
| 2 |
|
| 3 |
# STREAMLIT:
|
| 4 |
# https://www.datacamp.com/tutorial/streamlit:
|
|
|
|
| 250 |
start = time.process_time()
|
| 251 |
response = retrieval_chain.invoke({"input": prompt})
|
| 252 |
# print(f"Response time: {time.process_time() - start}")
|
| 253 |
+
st.write(f"Response time: {time.process_time() - start} seconds")
|
| 254 |
|
| 255 |
st.write(response["answer"])
|
| 256 |
|
|
|
|
| 260 |
for i, doc in enumerate(response["context"]):
|
| 261 |
# print(doc)
|
| 262 |
# st.write(f"Source Document # {i+1} : {doc.metadata['source'].split('/')[-1]}")
|
| 263 |
+
st.write(doc)
|
| 264 |
st.write(f"Source Document # {i+1} : {doc.metadata['source'].split('/')[-1]}")
|
| 265 |
|
| 266 |
|