jbilcke-hf HF staff commited on
Commit
8790f79
1 Parent(s): 9f3f3b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -20
app.py CHANGED
@@ -132,7 +132,9 @@ with gr.Blocks() as demo:
132
  use_negative_prompt.change(
133
  fn=lambda x: gr.update(visible=x),
134
  inputs=use_negative_prompt,
135
- outputs=negative_prompt
 
 
136
  )
137
 
138
  inputs = [
@@ -149,29 +151,14 @@ with gr.Blocks() as demo:
149
  prompt.submit(
150
  fn=randomize_seed_fn,
151
  inputs=[seed, randomize_seed],
152
- outputs=seed
 
 
153
  ).then(
154
  fn=generate,
155
  inputs=inputs,
156
  outputs=result,
157
  api_name='run',
158
  )
159
- negative_prompt.submit(
160
- fn=randomize_seed_fn,
161
- inputs=[seed, randomize_seed],
162
- outputs=seed
163
- ).then(
164
- fn=generate,
165
- inputs=inputs,
166
- outputs=result
167
- )
168
- run_button.click(
169
- fn=randomize_seed_fn,
170
- inputs=[seed, randomize_seed],
171
- outputs=seed
172
- ).then(
173
- fn=generate,
174
- inputs=inputs,
175
- outputs=result
176
- )
177
  demo.queue(max_size=6).launch()
 
132
  use_negative_prompt.change(
133
  fn=lambda x: gr.update(visible=x),
134
  inputs=use_negative_prompt,
135
+ outputs=negative_prompt,
136
+ queue=False,
137
+ api_name=False,
138
  )
139
 
140
  inputs = [
 
151
  prompt.submit(
152
  fn=randomize_seed_fn,
153
  inputs=[seed, randomize_seed],
154
+ outputs=seed,
155
+ queue=False,
156
+ api_name=False,
157
  ).then(
158
  fn=generate,
159
  inputs=inputs,
160
  outputs=result,
161
  api_name='run',
162
  )
163
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  demo.queue(max_size=6).launch()