Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,12 +48,12 @@ sentiment_pipeline = pipeline("sentiment-analysis")
|
|
48 |
|
49 |
# Ensure no corrupted ChromaDB storage
|
50 |
try:
|
51 |
-
chroma_client = Client(Settings(persist_directory=storage_path
|
52 |
except ValueError:
|
53 |
print("ChromaDB storage may be corrupted. Resetting storage...")
|
54 |
shutil.rmtree(storage_path, ignore_errors=True)
|
55 |
os.makedirs(storage_path)
|
56 |
-
chroma_client = Client(Settings(persist_directory=storage_path
|
57 |
|
58 |
# Initialize Embedding Function
|
59 |
embedding_fn = CustomEmbeddingFunction()
|
|
|
48 |
|
49 |
# Ensure no corrupted ChromaDB storage
|
50 |
try:
|
51 |
+
chroma_client = Client(Settings(persist_directory=storage_path))
|
52 |
except ValueError:
|
53 |
print("ChromaDB storage may be corrupted. Resetting storage...")
|
54 |
shutil.rmtree(storage_path, ignore_errors=True)
|
55 |
os.makedirs(storage_path)
|
56 |
+
chroma_client = Client(Settings(persist_directory=storage_path))
|
57 |
|
58 |
# Initialize Embedding Function
|
59 |
embedding_fn = CustomEmbeddingFunction()
|