Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,6 +73,9 @@ def predict(message, history):
|
|
| 73 |
#For now, we only query the vector database once, at the start.
|
| 74 |
if len(history) == 0:
|
| 75 |
source_text = vector_search(message)
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
history_transformer_format = history + [[message, ""]]
|
| 78 |
|
|
|
|
| 73 |
#For now, we only query the vector database once, at the start.
|
| 74 |
if len(history) == 0:
|
| 75 |
source_text = vector_search(message)
|
| 76 |
+
else:
|
| 77 |
+
source_text = re.sub("^.+?\n\n### Source ###\n", "", history[0][0])
|
| 78 |
+
print(source_text)
|
| 79 |
|
| 80 |
history_transformer_format = history + [[message, ""]]
|
| 81 |
|