Update app.py
Browse files
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
|
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))]
|