clone3 commited on
Commit
7d6a2a2
1 Parent(s): 332a5ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -73,7 +73,7 @@ def save_images(image_array, profile: gr.OAuthProfile | None, metadata: dict):
73
 
74
  def generate(
75
  prompt: str,
76
- test: str = 'How are You',
77
  seed: int = 0,
78
  guidance_scale: float = 8.0,
79
  num_inference_steps: int = 4,
@@ -125,6 +125,13 @@ with gr.Blocks(css="style.css") as demo:
125
  placeholder="Enter your prompt",
126
  container=False,
127
  )
 
 
 
 
 
 
 
128
  run_button = gr.Button("Run", scale=0)
129
  result = gr.Gallery(
130
  label="Generated images", show_label=False, elem_id="gallery", grid=[2]
@@ -171,12 +178,13 @@ with gr.Blocks(css="style.css") as demo:
171
  fn=generate,
172
  inputs=[
173
  prompt,
 
174
  seed,
175
  guidance_scale,
176
  num_inference_steps,
177
  randomize_seed
178
  ],
179
- outputs=[result, seed, "test"],
180
  api_name="run",
181
  )
182
 
 
73
 
74
  def generate(
75
  prompt: str,
76
+ test: str,
77
  seed: int = 0,
78
  guidance_scale: float = 8.0,
79
  num_inference_steps: int = 4,
 
125
  placeholder="Enter your prompt",
126
  container=False,
127
  )
128
+ test = gr.Text(
129
+ label="test",
130
+ show_label=False,
131
+ max_lines=1,
132
+ placeholder="Enter your prompt",
133
+ container=False,
134
+ )
135
  run_button = gr.Button("Run", scale=0)
136
  result = gr.Gallery(
137
  label="Generated images", show_label=False, elem_id="gallery", grid=[2]
 
178
  fn=generate,
179
  inputs=[
180
  prompt,
181
+ test,
182
  seed,
183
  guidance_scale,
184
  num_inference_steps,
185
  randomize_seed
186
  ],
187
+ outputs=[result, seed, test],
188
  api_name="run",
189
  )
190