sasha HF Staff commited on
Commit
0e41355
·
verified ·
1 Parent(s): 372dc7e

Update app.py

Browse files

ok, why is this not working?

Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -44,13 +44,14 @@ def get_model_size(model_info: ModelInfo):
44
 
45
  def add_docker_eval(zip_file):
46
  API.upload_file(
47
- path_or_fileobj= zip_file,
48
  repo_id="EnergyStarAI/tested_proprietary_models",
49
  path_in_repo=zip_file,
50
  repo_type="dataset",
51
  commit_message="Adding logs via submission Space.",
52
  token= TOKEN
53
  )
 
54
 
55
 
56
  def add_new_eval(
@@ -153,9 +154,9 @@ with gr.Blocks() as demo:
153
  with gr.Column():
154
  with gr.Accordion("Submit log files from a Docker run:", open = False):
155
  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:")
156
- file_output = gr.File(visible=False)
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):
 
44
 
45
  def add_docker_eval(zip_file):
46
  API.upload_file(
47
+ path_or_fileobj= 'submitted_models/'+zip_file,
48
  repo_id="EnergyStarAI/tested_proprietary_models",
49
  path_in_repo=zip_file,
50
  repo_type="dataset",
51
  commit_message="Adding logs via submission Space.",
52
  token= TOKEN
53
  )
54
+ print('Uploaded logs to dataset!')
55
 
56
 
57
  def add_new_eval(
 
154
  with gr.Column():
155
  with gr.Accordion("Submit log files from a Docker run:", 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.upload(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):