Pclanglais commited on
Commit
aa39e53
1 Parent(s): 22b51ff

Update app.py

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