bishmoy commited on
Commit
640eaac
Β·
verified Β·
1 Parent(s): c3cd787

lb shows last updated

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -4,8 +4,13 @@ import os
4
  from leaderboard import build_leaderboard
5
 
6
  def build_demo():
7
-
8
-
 
 
 
 
 
9
  with gr.Blocks() as demo:
10
  state = gr.State()
11
  with gr.Tab("Song Generation", id=0):
@@ -58,7 +63,7 @@ def build_demo():
58
  )
59
 
60
  with gr.Tab("Leaderboard", id=1):
61
- gr.Markdown("# πŸ† Leaderboard πŸ†")
62
  gr.Dataframe(
63
  headers=[
64
  "πŸ€– Model",
 
4
  from leaderboard import build_leaderboard
5
 
6
  def build_demo():
7
+ last_updated_path = 'results/last_updated.txt'
8
+ last_updated_str = ''
9
+ if os.path.exists(last_updated_path):
10
+ with open(last_updated_path, 'r') as f:
11
+ date = f.read()
12
+ last_updated_str = f"\nLast Updated : {date}"
13
+
14
  with gr.Blocks() as demo:
15
  state = gr.State()
16
  with gr.Tab("Song Generation", id=0):
 
63
  )
64
 
65
  with gr.Tab("Leaderboard", id=1):
66
+ gr.Markdown("# πŸ† Leaderboard πŸ†" + last_updated_str)
67
  gr.Dataframe(
68
  headers=[
69
  "πŸ€– Model",