Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -408,13 +408,7 @@ csv_url = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
|
408 |
|
409 |
def get_data():
|
410 |
try:
|
411 |
-
|
412 |
-
data = pd.read_csv(csv_url)
|
413 |
-
data = pd.read_csv(csv_url)
|
414 |
-
first_3_columns = data.iloc[:, 1:4]
|
415 |
-
sorted = first_3_columns.sort_values(by='discord_exp', ascending=False)
|
416 |
-
sorted.to_csv('first_3_columns.csv', index=False)
|
417 |
-
return sorted
|
418 |
except Exception as e:
|
419 |
print(f"on_message Error: {e}")
|
420 |
# csv
|
@@ -443,7 +437,7 @@ with demo:
|
|
443 |
#gr.Markdown("# π Experience Leaderboard")
|
444 |
with gr.Row():
|
445 |
with gr.Column():
|
446 |
-
gr.DataFrame(
|
447 |
|
448 |
with gr.Column():
|
449 |
gr.BarPlot(
|
|
|
408 |
|
409 |
def get_data():
|
410 |
try:
|
411 |
+
return community_global_df
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
except Exception as e:
|
413 |
print(f"on_message Error: {e}")
|
414 |
# csv
|
|
|
437 |
#gr.Markdown("# π Experience Leaderboard")
|
438 |
with gr.Row():
|
439 |
with gr.Column():
|
440 |
+
gr.DataFrame(get_data, every=5, height=500, interactive=False, col_count=(3, "fixed"), column_widths=["100px","100px","100px"])
|
441 |
|
442 |
with gr.Column():
|
443 |
gr.BarPlot(
|