Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,9 @@ enable_btn = gr.Button.update(interactive=True)
|
|
| 10 |
import sqlite3
|
| 11 |
|
| 12 |
import pymongo
|
| 13 |
-
|
| 14 |
def init_database():
|
| 15 |
-
client = pymongo.MongoClient("mongodb+srv://rwitzman
|
| 16 |
db = client["elo_ratings"]
|
| 17 |
collection = db["elo_ratings"]
|
| 18 |
return collection
|
|
|
|
| 10 |
import sqlite3
|
| 11 |
|
| 12 |
import pymongo
|
| 13 |
+
password=os.environ.get("MONGODB")
|
| 14 |
def init_database():
|
| 15 |
+
client = pymongo.MongoClient(f"mongodb+srv://rwitzman:{password}@cluster0.xb2urf6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0")
|
| 16 |
db = client["elo_ratings"]
|
| 17 |
collection = db["elo_ratings"]
|
| 18 |
return collection
|