lb shows last updated
Browse files
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",
|