Nolwenn
commited on
Commit
·
253820a
1
Parent(s):
4931dff
Fix
Browse files- crs_arena/utils.py +4 -1
crs_arena/utils.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
"""Utility functions for CRS Arena."""
|
2 |
|
|
|
3 |
import asyncio
|
4 |
import logging
|
5 |
import os
|
@@ -144,7 +145,9 @@ async def upload_feedback_to_gsheet(
|
|
144 |
"""
|
145 |
logging.debug("Uploading feedback to Google Sheets.")
|
146 |
try:
|
147 |
-
gs_connection = GSheetsServiceAccountClient(
|
|
|
|
|
148 |
df = gs_connection.read(worksheet=worksheet)
|
149 |
if df[df["id"] == row["id"]].empty:
|
150 |
df = pd.concat([df, pd.DataFrame([row])], ignore_index=True)
|
|
|
1 |
"""Utility functions for CRS Arena."""
|
2 |
|
3 |
+
import ast
|
4 |
import asyncio
|
5 |
import logging
|
6 |
import os
|
|
|
145 |
"""
|
146 |
logging.debug("Uploading feedback to Google Sheets.")
|
147 |
try:
|
148 |
+
gs_connection = GSheetsServiceAccountClient(
|
149 |
+
ast.literal_eval(st.secrets["gsheet"])
|
150 |
+
)
|
151 |
df = gs_connection.read(worksheet=worksheet)
|
152 |
if df[df["id"] == row["id"]].empty:
|
153 |
df = pd.concat([df, pd.DataFrame([row])], ignore_index=True)
|