Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
1b42e63
1
Parent(s):
72d3fba
Update app.py
Browse files
app.py
CHANGED
@@ -51,6 +51,7 @@ dataset = load_dataset("ttseval/tts-arena-new", token=os.getenv('HF_TOKEN'))
|
|
51 |
def reload_db():
|
52 |
global dataset
|
53 |
dataset = load_dataset("ttseval/tts-arena-new", token=os.getenv('HF_TOKEN'))
|
|
|
54 |
theme = gr.themes.Base(
|
55 |
font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
|
56 |
)
|
@@ -235,8 +236,8 @@ with gr.Blocks() as vote:
|
|
235 |
with gr.Blocks() as about:
|
236 |
gr.Markdown(ABOUT)
|
237 |
with gr.Blocks() as admin:
|
238 |
-
rdb = gr.Button("Reload
|
239 |
-
rdb.click(reload_db)
|
240 |
with gr.Blocks(theme=theme, css="footer {visibility: hidden}", title="TTS Leaderboard") as demo:
|
241 |
gr.Markdown(DESCR)
|
242 |
gr.TabbedInterface([vote, leaderboard, about, admin], ['Vote', 'Leaderboard', 'About', 'Admin (ONLY IN BETA)'])
|
|
|
51 |
def reload_db():
|
52 |
global dataset
|
53 |
dataset = load_dataset("ttseval/tts-arena-new", token=os.getenv('HF_TOKEN'))
|
54 |
+
return 'Reload Dataset'
|
55 |
theme = gr.themes.Base(
|
56 |
font=[gr.themes.GoogleFont('Libre Franklin'), gr.themes.GoogleFont('Public Sans'), 'system-ui', 'sans-serif'],
|
57 |
)
|
|
|
236 |
with gr.Blocks() as about:
|
237 |
gr.Markdown(ABOUT)
|
238 |
with gr.Blocks() as admin:
|
239 |
+
rdb = gr.Button("Reload Dataset")
|
240 |
+
rdb.click(reload_db, outputs=rdb)
|
241 |
with gr.Blocks(theme=theme, css="footer {visibility: hidden}", title="TTS Leaderboard") as demo:
|
242 |
gr.Markdown(DESCR)
|
243 |
gr.TabbedInterface([vote, leaderboard, about, admin], ['Vote', 'Leaderboard', 'About', 'Admin (ONLY IN BETA)'])
|