m-ric HF staff commited on
Commit
aa30f9a
Β·
verified Β·
1 Parent(s): b3dc0a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -59,7 +59,7 @@ css = """
59
  #textbox_id span {background-color: red}
60
  """
61
 
62
- with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
63
  packages = gr.Textbox("transformers", label="Package names (comma-separated)")
64
  log_scale = gr.Checkbox(label="Use logarithmic scale on Y-axis", value=False)
65
  error_box = gr.Textbox(label="Errors:", interactive=False, visible=False, elem_id="textbox_id")
@@ -68,4 +68,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
68
  render_btn.click(tracker.render, inputs=[packages, log_scale], outputs=[plot, error_box, error_box])
69
  log_scale.change(tracker.plot, inputs=[log_scale], outputs=[plot])
70
 
71
- app.launch()
 
 
 
59
  #textbox_id span {background-color: red}
60
  """
61
 
62
+ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
63
  packages = gr.Textbox("transformers", label="Package names (comma-separated)")
64
  log_scale = gr.Checkbox(label="Use logarithmic scale on Y-axis", value=False)
65
  error_box = gr.Textbox(label="Errors:", interactive=False, visible=False, elem_id="textbox_id")
 
68
  render_btn.click(tracker.render, inputs=[packages, log_scale], outputs=[plot, error_box, error_box])
69
  log_scale.change(tracker.plot, inputs=[log_scale], outputs=[plot])
70
 
71
+ demo.load(tracker.render, inputs=[packages, log_scale], outputs=[plot, error_box, error_box])
72
+
73
+ demo.launch()