Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -182,7 +182,8 @@ def embed_files(files,ui_session_id,progress=gr.Progress(),progress_step=0.05):
|
|
182 |
db = FAISS.load_local(session_id,embeddings, allow_dangerous_deserialization=True)
|
183 |
except:
|
184 |
print(f"SESSION: {session_id} database does not exist, create a FAISS db")
|
185 |
-
db = FAISS.from_documents([foo], embeddings)
|
|
|
186 |
db.save_local(session_id)
|
187 |
print(f"SESSION: {session_id} database created")
|
188 |
|
|
|
182 |
db = FAISS.load_local(session_id,embeddings, allow_dangerous_deserialization=True)
|
183 |
except:
|
184 |
print(f"SESSION: {session_id} database does not exist, create a FAISS db")
|
185 |
+
#db = FAISS.from_documents([foo], embeddings)
|
186 |
+
db = FAISS.from_texts(["foo is fou!",embeddings,[{"source":"foo source"}]])
|
187 |
db.save_local(session_id)
|
188 |
print(f"SESSION: {session_id} database created")
|
189 |
|