sasha HF Staff commited on
Commit
a50592b
·
verified ·
1 Parent(s): 2855221

Update app.py

Browse files

I still don't get the gr.File thing

Files changed (1) hide show
  1. app.py +6 -5
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
- api.upload_file(
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
- file_output = gr.File()
156
- 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:")
157
- u = gr.UploadButton("Upload a zip file with logs", file_count="single")
158
- u.upload(add_docker_eval,u, file_output)
 
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):