bgamazay commited on
Commit
824d4bb
·
verified ·
1 Parent(s): 63bb324

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -13
app.py CHANGED
@@ -164,12 +164,6 @@ with gr.Blocks() as demo:
164
  'style="margin: 0 10px; text-decoration: none; font-weight: bold; font-size: 1.1em; '
165
  'color: black; font-family: \'Inter\', sans-serif;">Documentation</a>'
166
  )
167
- download_link = gr.HTML(get_zip_data_link())
168
- community_link = gr.HTML(
169
- '<a href="https://huggingface.co/spaces/AIEnergyScore/README/discussions" '
170
- 'style="margin: 0 10px; text-decoration: none; font-weight: bold; font-size: 1.1em; '
171
- 'color: black; font-family: \'Inter\', sans-serif;">Community</a>'
172
- )
173
 
174
  # --- Logo (centered) ---
175
  gr.HTML('''
@@ -212,23 +206,25 @@ with gr.Blocks() as demo:
212
  with gr.Row():
213
  with gr.Column():
214
  with gr.Accordion("Submit log files from a Docker run:", open=False):
215
- 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:")
216
  agreement_checkbox = gr.Checkbox(label="""By checking the box below and submitting your energy score data, you confirm and agree to the following:
217
- 1. Public Data Sharing: You consent to the public sharing of the energy performance data derived from your submission. No additional information related to this model including proprietary configurations will be disclosed.
218
- 2. Data Integrity: You validate that the log files submitted are accurate, unaltered, and generated directly from testing your model as per the specified benchmarking procedures.
219
- 3. Model Representation: You verify that the model tested and submitted is representative of the production-level version of the model, including its level of quantization and any other relevant characteristics impacting energy efficiency and performance.""")
220
  file_output = gr.File(visible=False)
221
  u = gr.UploadButton("Upload a zip file with logs", file_count="single", interactive=False)
222
  u.upload(add_docker_eval, u, file_output)
223
-
224
  def update_upload_button_interactive(checkbox_value):
225
- return gr.UploadButton.update(interactive=checkbox_value)
226
-
 
227
  agreement_checkbox.change(
228
  fn=update_upload_button_interactive,
229
  inputs=[agreement_checkbox],
230
  outputs=[u]
231
  )
 
232
 
233
  with gr.Row():
234
  with gr.Column():
 
164
  'style="margin: 0 10px; text-decoration: none; font-weight: bold; font-size: 1.1em; '
165
  'color: black; font-family: \'Inter\', sans-serif;">Documentation</a>'
166
  )
 
 
 
 
 
 
167
 
168
  # --- Logo (centered) ---
169
  gr.HTML('''
 
206
  with gr.Row():
207
  with gr.Column():
208
  with gr.Accordion("Submit log files from a Docker run:", open=False):
209
+ gr.Markdown("If you've already benchmarked your model using the [Docker file](https://github.com/huggingface/AIEnergyScore/) provided, please upload the **entire run log directory** (in .zip format) below:")
210
  agreement_checkbox = gr.Checkbox(label="""By checking the box below and submitting your energy score data, you confirm and agree to the following:
211
+ - 1. Public Data Sharing: You consent to the public sharing of the energy performance data derived from your submission. No additional information related to this model including proprietary configurations will be disclosed.
212
+ - 2. Data Integrity: You validate that the log files submitted are accurate, unaltered, and generated directly from testing your model as per the specified benchmarking procedures.
213
+ - 3. Model Representation: You verify that the model tested and submitted is representative of the production-level version of the model, including its level of quantization and any other relevant characteristics impacting energy efficiency and performance.""")
214
  file_output = gr.File(visible=False)
215
  u = gr.UploadButton("Upload a zip file with logs", file_count="single", interactive=False)
216
  u.upload(add_docker_eval, u, file_output)
217
+
218
  def update_upload_button_interactive(checkbox_value):
219
+ # When checkbox_value is True, disable should be False (i.e. the button becomes active)
220
+ return gr.UploadButton.update(disabled=not checkbox_value)
221
+
222
  agreement_checkbox.change(
223
  fn=update_upload_button_interactive,
224
  inputs=[agreement_checkbox],
225
  outputs=[u]
226
  )
227
+
228
 
229
  with gr.Row():
230
  with gr.Column():