Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def init_astra_db():
|
|
| 83 |
astra_db_endpoint = os.getenv("ASTRA_DB_ENDPOINT", "https://8e3fd85c-5f28-4e1f-8538-9dd28a3ea2b0-us-east-2.apps.astra.datastax.com")
|
| 84 |
|
| 85 |
# Initialize the client
|
| 86 |
-
|
| 87 |
|
| 88 |
# Get or create collections
|
| 89 |
product_embeddings = db.get_collection("product_embeddings")
|
|
|
|
| 83 |
astra_db_endpoint = os.getenv("ASTRA_DB_ENDPOINT", "https://8e3fd85c-5f28-4e1f-8538-9dd28a3ea2b0-us-east-2.apps.astra.datastax.com")
|
| 84 |
|
| 85 |
# Initialize the client
|
| 86 |
+
db = DataAPIClient(api_endpoint=astra_db_endpoint, token=astra_db_application_token)
|
| 87 |
|
| 88 |
# Get or create collections
|
| 89 |
product_embeddings = db.get_collection("product_embeddings")
|