Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def store_document(text):
|
|
| 55 |
print("storing document")
|
| 56 |
|
| 57 |
# Generate a unique filename
|
| 58 |
-
filename = os.path.join(
|
| 59 |
|
| 60 |
# Save document in a file
|
| 61 |
with open(filename, "w") as f:
|
|
|
|
| 55 |
print("storing document")
|
| 56 |
|
| 57 |
# Generate a unique filename
|
| 58 |
+
filename = os.path.join(DOCUMENT_DIR, f"doc_{len(metadata) + 1}.txt")
|
| 59 |
|
| 60 |
# Save document in a file
|
| 61 |
with open(filename, "w") as f:
|