hysts HF staff commited on
Commit
4cabf12
1 Parent(s): 7426a63
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -3,7 +3,6 @@
3
  from __future__ import annotations
4
 
5
  import os
6
- import pathlib
7
  import random
8
 
9
  import gradio as gr
@@ -134,7 +133,7 @@ examples = [
134
  "An astronaut riding a green horse",
135
  ]
136
 
137
- with gr.Blocks(css_paths=pathlib.Path("style.css")) as demo:
138
  gr.Markdown(DESCRIPTION)
139
  gr.DuplicateButton(
140
  value="Duplicate Space for private use",
@@ -148,9 +147,8 @@ with gr.Blocks(css_paths=pathlib.Path("style.css")) as demo:
148
  show_label=False,
149
  max_lines=1,
150
  placeholder="Enter your prompt",
151
- container=False,
152
  )
153
- run_button = gr.Button("Run", scale=0)
154
  result = gr.Image(label="Result", show_label=False)
155
  with gr.Accordion("Advanced options", open=False):
156
  with gr.Row():
@@ -275,7 +273,6 @@ with gr.Blocks(css_paths=pathlib.Path("style.css")) as demo:
275
  negative_prompt.submit,
276
  prompt_2.submit,
277
  negative_prompt_2.submit,
278
- run_button.click,
279
  ],
280
  fn=randomize_seed_fn,
281
  inputs=[seed, randomize_seed],
 
3
  from __future__ import annotations
4
 
5
  import os
 
6
  import random
7
 
8
  import gradio as gr
 
133
  "An astronaut riding a green horse",
134
  ]
135
 
136
+ with gr.Blocks(css_paths="style.css") as demo:
137
  gr.Markdown(DESCRIPTION)
138
  gr.DuplicateButton(
139
  value="Duplicate Space for private use",
 
147
  show_label=False,
148
  max_lines=1,
149
  placeholder="Enter your prompt",
150
+ submit_btn=True,
151
  )
 
152
  result = gr.Image(label="Result", show_label=False)
153
  with gr.Accordion("Advanced options", open=False):
154
  with gr.Row():
 
273
  negative_prompt.submit,
274
  prompt_2.submit,
275
  negative_prompt_2.submit,
 
276
  ],
277
  fn=randomize_seed_fn,
278
  inputs=[seed, randomize_seed],