Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import streamlit as st
|
|
6 |
import gspread
|
7 |
import pymongo
|
8 |
|
9 |
-
@st.cache_resource
|
10 |
def init_conn():
|
11 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|
12 |
|
@@ -43,6 +43,8 @@ def init_conn():
|
|
43 |
MLB_Data = 'https://docs.google.com/spreadsheets/d/1f42Ergav8K1VsOLOK9MUn7DM_MLMvv4GR2Fy7EfnZTc/edit#gid=340831852'
|
44 |
|
45 |
gc_con = gspread.service_account_from_dict(credentials, scope)
|
|
|
|
|
46 |
|
47 |
return gc_con, client, db, DK_seed, FD_seed, MLB_Data
|
48 |
|
|
|
6 |
import gspread
|
7 |
import pymongo
|
8 |
|
9 |
+
@st.cache_resource(ttl = 600)
|
10 |
def init_conn():
|
11 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|
12 |
|
|
|
43 |
MLB_Data = 'https://docs.google.com/spreadsheets/d/1f42Ergav8K1VsOLOK9MUn7DM_MLMvv4GR2Fy7EfnZTc/edit#gid=340831852'
|
44 |
|
45 |
gc_con = gspread.service_account_from_dict(credentials, scope)
|
46 |
+
|
47 |
+
client.close()
|
48 |
|
49 |
return gc_con, client, db, DK_seed, FD_seed, MLB_Data
|
50 |
|