Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,12 +25,14 @@ async def direct_regenerate(model, user_input, chatbot, character_name, characte
|
|
25 |
password=os.environ.get("MONGODB")
|
26 |
|
27 |
def init_database():
|
28 |
-
uri = f"mongodb+srv://minh1228:{password}@
|
29 |
client = MongoClient(uri)
|
30 |
db = client["elo_ratings"]
|
31 |
collection = db["elo_ratings"]
|
32 |
return collection
|
33 |
|
|
|
|
|
34 |
def get_user_elo_ratings(collection):
|
35 |
rows = list(collection.find())
|
36 |
if rows:
|
|
|
25 |
password=os.environ.get("MONGODB")
|
26 |
|
27 |
def init_database():
|
28 |
+
uri = f"mongodb+srv://minh1228:{password}@cluster0minp.f7ruf.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0MinP"
|
29 |
client = MongoClient(uri)
|
30 |
db = client["elo_ratings"]
|
31 |
collection = db["elo_ratings"]
|
32 |
return collection
|
33 |
|
34 |
+
|
35 |
+
|
36 |
def get_user_elo_ratings(collection):
|
37 |
rows = list(collection.find())
|
38 |
if rows:
|