Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -58,17 +58,17 @@ def detect_intent(text):
|
|
58 |
label = result["labels"][0]
|
59 |
return label.lower()
|
60 |
|
61 |
-
if not os.path.exists("./
|
62 |
-
with zipfile.ZipFile("
|
63 |
zip_ref.extractall("./")
|
64 |
|
65 |
-
chroma_db_path = "./
|
66 |
chroma_client = chromadb.PersistentClient(path=chroma_db_path)
|
67 |
|
68 |
data = chroma_client.get_collection(name="my_dataaaa")
|
69 |
vectorstore = Chroma(
|
70 |
collection_name="my_dataaaa",
|
71 |
-
persist_directory="./
|
72 |
embedding_function=embeddings_model
|
73 |
)
|
74 |
|
|
|
58 |
label = result["labels"][0]
|
59 |
return label.lower()
|
60 |
|
61 |
+
if not os.path.exists("./chroma_db_Copy"):
|
62 |
+
with zipfile.ZipFile("chroma_db_Copy.zip", "r") as zip_ref:
|
63 |
zip_ref.extractall("./")
|
64 |
|
65 |
+
chroma_db_path = "./chroma_db_Copy"
|
66 |
chroma_client = chromadb.PersistentClient(path=chroma_db_path)
|
67 |
|
68 |
data = chroma_client.get_collection(name="my_dataaaa")
|
69 |
vectorstore = Chroma(
|
70 |
collection_name="my_dataaaa",
|
71 |
+
persist_directory="./chroma_db_Copy",
|
72 |
embedding_function=embeddings_model
|
73 |
)
|
74 |
|