TxAgent-Api / db /mongo.py
Ali2206's picture
Update db/mongo.py
85d52f6 verified
raw
history blame
349 Bytes
from motor.motor_asyncio import AsyncIOMotorClient
import os
MONGODB_URI = os.getenv("MONGODB_URI") # Make sure it's added to your Hugging Face Space secrets
client = AsyncIOMotorClient(MONGODB_URI)
db = client["cps_db"] # Adjust if your database name is different
patients_collection = db["patients"]
results_collection = db["txagent_results"]