zhimin-z commited on
Commit
c931f22
·
1 Parent(s): b76b31c
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -296,6 +296,12 @@ def create_monthly_metrics_plot(type="issue", top_n=5):
296
  no_data_msg = "No discussion data available for visualization"
297
  total_label = "Total Discussions"
298
  print_msg = "discussion"
 
 
 
 
 
 
299
  else: # default to "issue"
300
  metrics_key = 'issue_monthly_metrics'
301
  total_field = 'total_issues'
@@ -757,6 +763,10 @@ with gr.Blocks(title="SWE Assistant Issue & Discussion Leaderboard", theme=gr.th
757
  gr.Markdown("*Discussion volume and resolved rate over time*")
758
  discussion_metrics_plot = gr.Plot()
759
 
 
 
 
 
760
  # Load monthly metrics when app starts
761
  app.load(
762
  fn=lambda: create_monthly_metrics_plot(),
@@ -771,6 +781,13 @@ with gr.Blocks(title="SWE Assistant Issue & Discussion Leaderboard", theme=gr.th
771
  outputs=[discussion_metrics_plot]
772
  )
773
 
 
 
 
 
 
 
 
774
 
775
  # Issues Wanted Tab
776
  with gr.Tab("Issues Wanted"):
 
296
  no_data_msg = "No discussion data available for visualization"
297
  total_label = "Total Discussions"
298
  print_msg = "discussion"
299
+ elif type == "wanted":
300
+ metrics_key = 'wanted_issue_monthly_metrics'
301
+ total_field = 'total_wanted_issues'
302
+ no_data_msg = "No wanted issue data available for visualization"
303
+ total_label = "Total Wanted Issues"
304
+ print_msg = "wanted issue"
305
  else: # default to "issue"
306
  metrics_key = 'issue_monthly_metrics'
307
  total_field = 'total_issues'
 
763
  gr.Markdown("*Discussion volume and resolved rate over time*")
764
  discussion_metrics_plot = gr.Plot()
765
 
766
+ with gr.Column():
767
+ gr.Markdown("*Wanted issue volume and resolved rate over time*")
768
+ wanted_metrics_plot = gr.Plot()
769
+
770
  # Load monthly metrics when app starts
771
  app.load(
772
  fn=lambda: create_monthly_metrics_plot(),
 
781
  outputs=[discussion_metrics_plot]
782
  )
783
 
784
+ # Load wanted issue monthly metrics when app starts
785
+ app.load(
786
+ fn=lambda: create_monthly_metrics_plot(type="wanted"),
787
+ inputs=[],
788
+ outputs=[wanted_metrics_plot]
789
+ )
790
+
791
 
792
  # Issues Wanted Tab
793
  with gr.Tab("Issues Wanted"):