Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -537,7 +537,7 @@ async def xp_help(ctx):
|
|
537 |
help_message = "How to earn Discord / Hub exp: Post messages, react, Like, discuss, create repos and papers"
|
538 |
await ctx.author.send(help_message)
|
539 |
except Exception as e:
|
540 |
-
print(f"
|
541 |
|
542 |
|
543 |
@bot.command()
|
@@ -573,19 +573,19 @@ def get_data():
|
|
573 |
try:
|
574 |
return community_global_df
|
575 |
except Exception as e:
|
576 |
-
print(f"
|
577 |
|
578 |
|
579 |
def get_data2():
|
580 |
try:
|
581 |
display_data = {
|
582 |
'π€ Hub (+30 exp)': ['Creating Repos', 'Papers', 'Likes/Upvotes', 'Discussions'],
|
583 |
-
'Discord (+10 exp)': ['Posting messages', 'Reacting']
|
584 |
}
|
585 |
display_df = pd.DataFrame(display_data)
|
586 |
return display_df
|
587 |
except Exception as e:
|
588 |
-
print(f"
|
589 |
|
590 |
|
591 |
demo = gr.Blocks()
|
@@ -623,10 +623,11 @@ with demo:
|
|
623 |
)
|
624 |
with gr.Row():
|
625 |
gr.Markdown("# π How to earn Experience!")
|
626 |
-
|
|
|
627 |
#with gr.TabItem("π Members of the Week", elem_id="week-table", id=1):
|
628 |
|
629 |
#with gr.TabItem("π Hub-only leaderboard", elem_id="hub-table", id=2):
|
630 |
except Exception as e:
|
631 |
-
print(f"
|
632 |
demo.queue().launch()
|
|
|
537 |
help_message = "How to earn Discord / Hub exp: Post messages, react, Like, discuss, create repos and papers"
|
538 |
await ctx.author.send(help_message)
|
539 |
except Exception as e:
|
540 |
+
print(f"xp_help Error: {e}")
|
541 |
|
542 |
|
543 |
@bot.command()
|
|
|
573 |
try:
|
574 |
return community_global_df
|
575 |
except Exception as e:
|
576 |
+
print(f"get_data Error: {e}")
|
577 |
|
578 |
|
579 |
def get_data2():
|
580 |
try:
|
581 |
display_data = {
|
582 |
'π€ Hub (+30 exp)': ['Creating Repos', 'Papers', 'Likes/Upvotes', 'Discussions'],
|
583 |
+
'Discord (+10 exp)': ['Posting messages', 'Reacting', '', '']
|
584 |
}
|
585 |
display_df = pd.DataFrame(display_data)
|
586 |
return display_df
|
587 |
except Exception as e:
|
588 |
+
print(f"get_data2 Error: {e}")
|
589 |
|
590 |
|
591 |
demo = gr.Blocks()
|
|
|
623 |
)
|
624 |
with gr.Row():
|
625 |
gr.Markdown("# π How to earn Experience!")
|
626 |
+
with gr.Row():
|
627 |
+
gr.DataFrame(get_data2, every=5, interactive=False)
|
628 |
#with gr.TabItem("π Members of the Week", elem_id="week-table", id=1):
|
629 |
|
630 |
#with gr.TabItem("π Hub-only leaderboard", elem_id="hub-table", id=2):
|
631 |
except Exception as e:
|
632 |
+
print(f"gradio demo Error: {e}")
|
633 |
demo.queue().launch()
|