Spaces:
Running
Running
Update app.py
Browse filesmaybe this will work?
app.py
CHANGED
|
@@ -42,6 +42,17 @@ def get_model_size(model_info: ModelInfo):
|
|
| 42 |
return 0 # Unknown model sizes are indicated as 0, see NUMERIC_INTERVALS in app.py
|
| 43 |
return model_size
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
def add_new_eval(
|
| 47 |
repo_id: str,
|
|
@@ -140,8 +151,10 @@ with gr.Blocks() as demo:
|
|
| 140 |
outputs=submission_result,
|
| 141 |
)
|
| 142 |
with gr.Row():
|
| 143 |
-
gr.
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
with gr.Row():
|
| 146 |
with gr.Column():
|
| 147 |
with gr.Accordion("Models that are in the latest leaderboard version:", open = False):
|
|
|
|
| 42 |
return 0 # Unknown model sizes are indicated as 0, see NUMERIC_INTERVALS in app.py
|
| 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",
|
| 50 |
+
repo_type="dataset",
|
| 51 |
+
commit_message="Adding logs via submission Space.",
|
| 52 |
+
token= TOKEN
|
| 53 |
+
)
|
| 54 |
+
return 'Uploaded logs to dataset!'
|
| 55 |
+
|
| 56 |
|
| 57 |
def add_new_eval(
|
| 58 |
repo_id: str,
|
|
|
|
| 151 |
outputs=submission_result,
|
| 152 |
)
|
| 153 |
with gr.Row():
|
| 154 |
+
with gr.Column():
|
| 155 |
+
gr.Markdown("If you 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:")
|
| 156 |
+
u = gr.UploadButton("Upload a zip file with logs", file_count="single")
|
| 157 |
+
u.upload(add_docker_eval,upload_button, file_output) )
|
| 158 |
with gr.Row():
|
| 159 |
with gr.Column():
|
| 160 |
with gr.Accordion("Models that are in the latest leaderboard version:", open = False):
|