arshadrana commited on
Commit
877de1f
·
verified ·
1 Parent(s): b94c2db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -127,11 +127,12 @@ with gr.Blocks(css=css) as demo:
127
  examples = examples,
128
  inputs = [prompt]
129
  )
130
- gr.on(
131
- triggers=[run_button.click, prompt.submit, negative_prompt.submit],
 
132
  fn = infer,
133
  inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
134
  outputs = [result, seed]
135
  )
136
 
137
- demo.launch()
 
127
  examples = examples,
128
  inputs = [prompt]
129
  )
130
+
131
+ # Use .click() to link the button to the infer function
132
+ run_button.click(
133
  fn = infer,
134
  inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
135
  outputs = [result, seed]
136
  )
137
 
138
+ demo.launch()