sedrickkeh commited on
Commit
4284204
1 Parent(s): 1de1fd2

fix secret keys

Browse files
Files changed (1) hide show
  1. response_db.py +4 -0
response_db.py CHANGED
@@ -1,9 +1,13 @@
1
  from pymongo import MongoClient
2
  import datetime
 
3
 
4
  class ResponseDb:
5
  def __init__(self):
6
  # Set up the connection
 
 
 
7
  self.client = MongoClient(f"mongodb+srv://{mongodb_username}:{mongodb_pw}@{mongodb_cluster_url}/?retryWrites=true&w=majority")
8
  self.db = self.client['vqa-game']
9
  self.collection = self.db['vqa-game']
 
1
  from pymongo import MongoClient
2
  import datetime
3
+ import os
4
 
5
  class ResponseDb:
6
  def __init__(self):
7
  # Set up the connection
8
+ mongodb_username = os.environ['mongodb_username']
9
+ mongodb_pw = os.environ['mongodb_pw']
10
+ mongodb_cluster_url = os.environ['mongodb_cluster_url']
11
  self.client = MongoClient(f"mongodb+srv://{mongodb_username}:{mongodb_pw}@{mongodb_cluster_url}/?retryWrites=true&w=majority")
12
  self.db = self.client['vqa-game']
13
  self.collection = self.db['vqa-game']