rwitz commited on
Commit
5158e04
1 Parent(s): e2a026e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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:<password>@cluster0.xb2urf6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0")
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