abidlabs HF staff commited on
Commit
cfdebc6
·
1 Parent(s): 4101c6b

Load images when page loads

Browse files

Load images when page loads instead of clicking on the button

Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -16,11 +16,7 @@ with block:
16
  with gr.Group():
17
  with gr.Box():
18
  gallery=gr.Gallery(label="Hug Gallery")
19
- btn = gr.Button("Run").style(
20
- margin=False,
21
- rounded=(False, True, True, False),
22
- )
23
- btn.click(infer, inputs=None, outputs=gallery)
24
 
25
  block.launch()
26
 
 
16
  with gr.Group():
17
  with gr.Box():
18
  gallery=gr.Gallery(label="Hug Gallery")
19
+ block.load(infer, inputs=None, outputs=gallery)
 
 
 
 
20
 
21
  block.launch()
22