lunarflu HF staff commited on
Commit
63e32ce
β€’
1 Parent(s): bfb3bca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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"on_message Error: {e}")
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"on_message 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"on_message Error: {e}")
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
- gr.DataFrame(get_data2, every=5, height=500, interactive=False, column_widths=["100px","100px","100px"])
 
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"on_message Error: {e}")
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()