Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,12 +32,10 @@ def init_conn():
|
|
| 32 |
}
|
| 33 |
|
| 34 |
gc_con = gspread.service_account_from_dict(credentials, scope)
|
| 35 |
-
|
| 36 |
-
client = pymongo.MongoClient("mongodb+srv://multichem:G4yDYEX46uSft4gg@testcluster.lgwtp5i.mongodb.net/testing_db")
|
| 37 |
|
| 38 |
-
return gc_con
|
| 39 |
|
| 40 |
-
gcservice_account
|
| 41 |
|
| 42 |
NBA_Data = 'https://docs.google.com/spreadsheets/d/1Yq0vGriWK-bS79e-bD6_u9pqrYE6Yrlbb_wEkmH-ot0/edit#gid=1808117109'
|
| 43 |
|
|
@@ -46,7 +44,7 @@ percentages_format = {'PG': '{:.2%}', 'SG': '{:.2%}', 'SF': '{:.2%}', 'PF': '{:.
|
|
| 46 |
@st.cache_resource(ttl = 600)
|
| 47 |
def init_baselines():
|
| 48 |
sh = gcservice_account.open_by_url(NBA_Data)
|
| 49 |
-
|
| 50 |
db = client["testing_db"]
|
| 51 |
collection = db["gamelog"]
|
| 52 |
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
gc_con = gspread.service_account_from_dict(credentials, scope)
|
|
|
|
|
|
|
| 35 |
|
| 36 |
+
return gc_con
|
| 37 |
|
| 38 |
+
gcservice_account = init_conn()
|
| 39 |
|
| 40 |
NBA_Data = 'https://docs.google.com/spreadsheets/d/1Yq0vGriWK-bS79e-bD6_u9pqrYE6Yrlbb_wEkmH-ot0/edit#gid=1808117109'
|
| 41 |
|
|
|
|
| 44 |
@st.cache_resource(ttl = 600)
|
| 45 |
def init_baselines():
|
| 46 |
sh = gcservice_account.open_by_url(NBA_Data)
|
| 47 |
+
client = pymongo.MongoClient("mongodb+srv://multichem:G4yDYEX46uSft4gg@testcluster.lgwtp5i.mongodb.net/testing_db")
|
| 48 |
db = client["testing_db"]
|
| 49 |
collection = db["gamelog"]
|
| 50 |
|