Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def download_csv():
|
|
16 |
# pull the results and return this file!
|
17 |
submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
|
18 |
submission_repo.git_pull()
|
19 |
-
return CSV_DIR
|
20 |
|
21 |
def upload_file(files):
|
22 |
file_paths = [file.name for file in files]
|
@@ -242,9 +242,11 @@ with block:
|
|
242 |
|
243 |
with gr.Row():
|
244 |
data_run = gr.Button("Refresh")
|
|
|
245 |
result_download = gr.Button("Download Leaderboard")
|
|
|
246 |
data_run.click(on_filter_model_size_method_change, inputs=[checkbox_group], outputs=data_component)
|
247 |
-
result_download.click(download_csv, inputs=None, outputs=
|
248 |
|
249 |
|
250 |
block.launch()
|
|
|
16 |
# pull the results and return this file!
|
17 |
submission_repo = Repository(local_dir=SUBMISSION_NAME, clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset")
|
18 |
submission_repo.git_pull()
|
19 |
+
return CSV_DIR, gr.update(visible=True)
|
20 |
|
21 |
def upload_file(files):
|
22 |
file_paths = [file.name for file in files]
|
|
|
242 |
|
243 |
with gr.Row():
|
244 |
data_run = gr.Button("Refresh")
|
245 |
+
with gr.Row():
|
246 |
result_download = gr.Button("Download Leaderboard")
|
247 |
+
file_download = gr.File(label="download the csv of leaderborad.", visible=False)
|
248 |
data_run.click(on_filter_model_size_method_change, inputs=[checkbox_group], outputs=data_component)
|
249 |
+
result_download.click(download_csv, inputs=None, outputs= file_download)
|
250 |
|
251 |
|
252 |
block.launch()
|