Spaces:
Running
Running
Commit
·
7e7ab71
1
Parent(s):
ed035f0
Updating path for chroma_db
Browse files- src/__pycache__/main.cpython-312.pyc +0 -0
- src/main.py +3 -9
src/__pycache__/main.cpython-312.pyc
CHANGED
Binary files a/src/__pycache__/main.cpython-312.pyc and b/src/__pycache__/main.cpython-312.pyc differ
|
|
src/main.py
CHANGED
@@ -77,15 +77,9 @@ UPLOADS_DIR = Path(settings.UPLOADS_DIR)
|
|
77 |
UPLOADS_DIR.mkdir(parents=True, exist_ok=True)
|
78 |
|
79 |
chroma_path = Path(settings.CHROMA_PATH)
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
except PermissionError:
|
84 |
-
# If the original location fails, try a directory relative to the current working directory
|
85 |
-
alt_path = Path(os.getcwd()) / "data" / "chroma_db"
|
86 |
-
alt_path.mkdir(parents=True, exist_ok=True)
|
87 |
-
settings.CHROMA_PATH = str(alt_path)
|
88 |
-
print(f"Using alternative ChromaDB path: {alt_path}")
|
89 |
|
90 |
# Initialize core components
|
91 |
doc_processor = DocumentProcessor()
|
|
|
77 |
UPLOADS_DIR.mkdir(parents=True, exist_ok=True)
|
78 |
|
79 |
chroma_path = Path(settings.CHROMA_PATH)
|
80 |
+
chroma_path.mkdir(parents=True, exist_ok=True)
|
81 |
+
print(f"ChromaDB directory created at: {chroma_path}")
|
82 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
# Initialize core components
|
85 |
doc_processor = DocumentProcessor()
|