Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ def _get_worksheet():
|
|
| 17 |
raise RuntimeError("Missing GOOGLE_CREDS secret in Hugging Face Space")
|
| 18 |
|
| 19 |
creds_dict = json.loads(creds_json)
|
| 20 |
-
scopes = ["https://www.googleapis.com/auth/spreadsheets"]
|
| 21 |
creds = Credentials.from_service_account_info(creds_dict, scopes=scopes)
|
| 22 |
gc = gspread.authorize(creds)
|
| 23 |
return gc.open_by_key(SHEET_ID).sheet1 # First worksheet
|
|
|
|
| 17 |
raise RuntimeError("Missing GOOGLE_CREDS secret in Hugging Face Space")
|
| 18 |
|
| 19 |
creds_dict = json.loads(creds_json)
|
| 20 |
+
scopes = ["https://www.googleapis.com/auth/spreadsheets", "https://www.googleapis.com/auth/drive"]
|
| 21 |
creds = Credentials.from_service_account_info(creds_dict, scopes=scopes)
|
| 22 |
gc = gspread.authorize(creds)
|
| 23 |
return gc.open_by_key(SHEET_ID).sheet1 # First worksheet
|