Mdrnfox commited on
Commit
3360b16
·
verified ·
1 Parent(s): 2d819a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -24,12 +24,13 @@ def run_peft_eval():
24
  except Exception as e:
25
  print("Failed to shutdown:", e, flush=True)
26
 
27
- return f"PEFT-Bench completed at {datetime.datetime.utcnow():%Y-%m-%d %H:%M UTC}"
28
 
29
  with gr.Blocks() as demo:
30
  gr.Markdown("## PEFT-Bench Evaluation")
31
- gr.Markdown("This Space runs evaluation and automatically shuts down when done.")
32
- output = gr.Textbox(label="Status", lines=2)
33
- demo.load(fn=run_peft_eval, outputs=output, every=0.1)
 
34
 
35
  demo.launch()
 
24
  except Exception as e:
25
  print("Failed to shutdown:", e, flush=True)
26
 
27
+ return f"PEFT-Bench completed at {datetime.datetime.utcnow():%Y-%m-%d %H:%M UTC}"
28
 
29
  with gr.Blocks() as demo:
30
  gr.Markdown("## PEFT-Bench Evaluation")
31
+ gr.Markdown("This Space runs evaluation and shuts down when finished.")
32
+ status = gr.Textbox(label="Status", lines=2)
33
+ btn = gr.Button("Start Evaluation Now")
34
+ btn.click(run_peft_eval, outputs=status)
35
 
36
  demo.launch()