Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -708,17 +708,14 @@ demo = gr.Blocks()
|
|
708 |
with demo:
|
709 |
try:
|
710 |
dataframe1 = pd.read_csv("https://docs.google.com/spreadsheets/d/1C8aLqgCqLYcMiIFf-P_Aosaa03C_WLIB_UyqvjSdWg8/export?format=csv&gid=0") # required for timing
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
except Exception as e:
|
720 |
-
print(f"gradio display error Error: {e}")
|
721 |
-
print(f"dataframe2: {dataframe2}")
|
722 |
|
723 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|
724 |
gr.HTML(TITLE)
|
|
|
708 |
with demo:
|
709 |
try:
|
710 |
dataframe1 = pd.read_csv("https://docs.google.com/spreadsheets/d/1C8aLqgCqLYcMiIFf-P_Aosaa03C_WLIB_UyqvjSdWg8/export?format=csv&gid=0") # required for timing
|
711 |
+
print(dataframe1)
|
712 |
+
|
713 |
+
level_counts = dataframe1['discord_level'].value_counts().sort_index()
|
714 |
+
dataframe2 = pd.DataFrame({
|
715 |
+
'Levels': level_counts.index,
|
716 |
+
'Members': level_counts.values
|
717 |
+
})
|
718 |
+
print(dataframe2)
|
|
|
|
|
|
|
719 |
|
720 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|
721 |
gr.HTML(TITLE)
|