TheBobBob commited on
Commit
5097bf9
·
verified ·
1 Parent(s): 74b3274

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -168,8 +168,9 @@ def create_vector_db(final_items):
168
  )
169
 
170
  final_result = model_output["choices"][0]["text"].strip()
 
171
 
172
- if final_items:
173
  db.add(
174
  documents=documents,
175
  ids=[f"id{i}" for i in range(len(documents))]
 
168
  )
169
 
170
  final_result = model_output["choices"][0]["text"].strip()
171
+ documents.append(final_result)
172
 
173
+ if documents:
174
  db.add(
175
  documents=documents,
176
  ids=[f"id{i}" for i in range(len(documents))]