Spaces:
Runtime error
Runtime error
| import pymongo | |
| import gridfs | |
| # Connect to MongoDB with the custom SSL context | |
| client = pymongo.MongoClient("mongodb+srv://soham:[email protected]/?retryWrites=true&w=majority", ssl=True) | |
| db = client.database | |
| # Define collections | |
| admin_collection = db.admin_users | |
| user_collection = db.normal_users | |
| notification_collection = db.notifications | |
| pothole_image_collection = db.pothole_images | |
| fs = gridfs.GridFS(db) # Initialize GridFS bucket | |