Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,12 +18,14 @@ model = SentenceTransformer(config.MODEL_PATH)
|
|
| 18 |
collection = None
|
| 19 |
|
| 20 |
print(f"🔄 Connecting to ChromaDB from cloud...")
|
|
|
|
|
|
|
| 21 |
client = chromadb.CloudClient(
|
| 22 |
api_key=os.environ.get("chromadb_api_key"),
|
| 23 |
tenant=os.environ.get("chromadb_tenant"),
|
| 24 |
database=os.environ.get("chromadb_db")
|
| 25 |
)
|
| 26 |
-
print(f"Connection to chromabd successful {
|
| 27 |
|
| 28 |
# === COLLECTION VALIDATION ===
|
| 29 |
# Ensure the required collection exists and has data
|
|
|
|
| 18 |
collection = None
|
| 19 |
|
| 20 |
print(f"🔄 Connecting to ChromaDB from cloud...")
|
| 21 |
+
database = os.environ.get("chromadb_db")
|
| 22 |
+
api_key = os.environ.get("chromadb_api_key")
|
| 23 |
client = chromadb.CloudClient(
|
| 24 |
api_key=os.environ.get("chromadb_api_key"),
|
| 25 |
tenant=os.environ.get("chromadb_tenant"),
|
| 26 |
database=os.environ.get("chromadb_db")
|
| 27 |
)
|
| 28 |
+
print(f"Connection to chromabd successful {database} {api_key}")
|
| 29 |
|
| 30 |
# === COLLECTION VALIDATION ===
|
| 31 |
# Ensure the required collection exists and has data
|