Spaces:
Running
Running
Update app.py
Browse filesI still don't get the gr.File thing
app.py
CHANGED
@@ -43,7 +43,7 @@ def get_model_size(model_info: ModelInfo):
|
|
43 |
return model_size
|
44 |
|
45 |
def add_docker_eval(zip_file):
|
46 |
-
|
47 |
path_or_fileobj= zip_file,
|
48 |
path_in_repo=args.run_dir,
|
49 |
repo_id="EnergyStarAI/tested_proprietary_models",
|
@@ -152,10 +152,11 @@ with gr.Blocks() as demo:
|
|
152 |
)
|
153 |
with gr.Row():
|
154 |
with gr.Column():
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
159 |
with gr.Row():
|
160 |
with gr.Column():
|
161 |
with gr.Accordion("Models that are in the latest leaderboard version:", open = False):
|
|
|
43 |
return model_size
|
44 |
|
45 |
def add_docker_eval(zip_file):
|
46 |
+
API.upload_file(
|
47 |
path_or_fileobj= zip_file,
|
48 |
path_in_repo=args.run_dir,
|
49 |
repo_id="EnergyStarAI/tested_proprietary_models",
|
|
|
152 |
)
|
153 |
with gr.Row():
|
154 |
with gr.Column():
|
155 |
+
with gr.Accordion("Submit log files:", open = False):
|
156 |
+
gr.Markdown("If you've already benchmarked your model using the [Docker file](https://github.com/huggingface/EnergyStarAI/) provided, please upload the **entire run log directory** (in .zip format) below:")
|
157 |
+
file_output = gr.File()
|
158 |
+
u = gr.UploadButton("Upload a zip file with logs", file_count="single")
|
159 |
+
u.click(add_docker_eval,u, file_output)
|
160 |
with gr.Row():
|
161 |
with gr.Column():
|
162 |
with gr.Accordion("Models that are in the latest leaderboard version:", open = False):
|