Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -420,6 +420,21 @@ with demo:
|
|
420 |
print("\nDataframe 2:")
|
421 |
print(dataframe2)
|
422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|
424 |
gr.HTML(TITLE)
|
425 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
|
|
420 |
print("\nDataframe 2:")
|
421 |
print(dataframe2)
|
422 |
|
423 |
+
|
424 |
+
# testing sheet -> read -> paste sheet
|
425 |
+
worksheet_test = gspread_bot.open("test").sheet1
|
426 |
+
#worksheet = gspread_bot.open("levelbot").sheet1
|
427 |
+
|
428 |
+
URL_test = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
429 |
+
csv_url_test = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
430 |
+
response = requests.get(csv_url)
|
431 |
+
if response.status_code == 200:
|
432 |
+
csv_content = response.text
|
433 |
+
print(csv_content)
|
434 |
+
worksheet_test.update('A1', csv_data)
|
435 |
+
|
436 |
+
|
437 |
+
|
438 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|
439 |
gr.HTML(TITLE)
|
440 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|