Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
28550ba
1
Parent(s):
0edfc09
Update app.py
Browse files
app.py
CHANGED
@@ -183,7 +183,9 @@ with gr.Blocks() as leaderboard:
|
|
183 |
gr.Markdown(LDESC)
|
184 |
# df = gr.Dataframe(interactive=False, value=get_data())
|
185 |
df = gr.Dataframe(interactive=False, min_width=0, wrap=True, column_widths=[200, 50, 50])
|
|
|
186 |
leaderboard.load(get_data, outputs=[df])
|
|
|
187 |
|
188 |
with gr.Blocks() as vote:
|
189 |
gr.Markdown(INSTR)
|
@@ -252,7 +254,7 @@ def sync_db():
|
|
252 |
token=os.getenv('HF_TOKEN')
|
253 |
)
|
254 |
while True:
|
255 |
-
time.sleep(60 *
|
256 |
print("Uploading DB")
|
257 |
api.upload_file(
|
258 |
path_or_fileobj='database.db',
|
|
|
183 |
gr.Markdown(LDESC)
|
184 |
# df = gr.Dataframe(interactive=False, value=get_data())
|
185 |
df = gr.Dataframe(interactive=False, min_width=0, wrap=True, column_widths=[200, 50, 50])
|
186 |
+
reloadbtn = gr.Button("Refresh")
|
187 |
leaderboard.load(get_data, outputs=[df])
|
188 |
+
reloadbtn.click(get_data, outputs=[df])
|
189 |
|
190 |
with gr.Blocks() as vote:
|
191 |
gr.Markdown(INSTR)
|
|
|
254 |
token=os.getenv('HF_TOKEN')
|
255 |
)
|
256 |
while True:
|
257 |
+
time.sleep(60 * 10)
|
258 |
print("Uploading DB")
|
259 |
api.upload_file(
|
260 |
path_or_fileobj='database.db',
|