Pybunny commited on
Commit
5ae3b00
·
verified ·
1 Parent(s): 58691e4

Revert gradio + strip schema-breaking kwargs

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -402,29 +402,23 @@ def build_ui() -> gr.Blocks:
402
  )
403
  with gr.Row():
404
  with gr.Column():
405
- model_py = gr.File(label="Model definition (.py)",
406
- file_types=[".py"])
407
- weights = gr.File(label="Weights (.pt, optional for "
408
- "sanity checks)",
409
- file_types=[".pt", ".pth"])
410
  class_name = gr.Textbox(label="Class name",
411
  value="Model")
412
  output_kind = gr.Radio(
413
  ["watts", "shares"],
414
  value="watts",
415
- label="Output kind",
416
- info="watts = per-category power directly; "
417
- "shares = renormalise + scale by aggregate")
418
  max_frames = gr.Slider(50, 60000, value=500, step=50,
419
- label="Frames to score",
420
- info="Free-tier CPU. Default 500 "
421
- "≈ 1–2 min. Full 60 000 "
422
- "frames may take longer.")
423
  batch_size = gr.Slider(1, 64, value=16, step=1,
424
  label="Batch size")
425
  run_btn = gr.Button("Run benchmark", variant="primary")
426
  with gr.Column():
427
- report_md = gr.Markdown(label="Report")
428
  score_file = gr.File(label="Download score.json")
429
  run_btn.click(
430
  run_benchmark_upload,
 
402
  )
403
  with gr.Row():
404
  with gr.Column():
405
+ model_py = gr.File(label="Model definition (.py)")
406
+ weights = gr.File(label="Weights (.pt, optional)")
 
 
 
407
  class_name = gr.Textbox(label="Class name",
408
  value="Model")
409
  output_kind = gr.Radio(
410
  ["watts", "shares"],
411
  value="watts",
412
+ label="Output kind (watts = per-category power; "
413
+ "shares = renormalise + scale by aggregate)")
 
414
  max_frames = gr.Slider(50, 60000, value=500, step=50,
415
+ label="Frames to score "
416
+ "(free CPU: 500 ≈ 1–2 min)")
 
 
417
  batch_size = gr.Slider(1, 64, value=16, step=1,
418
  label="Batch size")
419
  run_btn = gr.Button("Run benchmark", variant="primary")
420
  with gr.Column():
421
+ report_md = gr.Markdown()
422
  score_file = gr.File(label="Download score.json")
423
  run_btn.click(
424
  run_benchmark_upload,