multimodalart HF Staff commited on
Commit
3f0002c
·
verified ·
1 Parent(s): 3a14252

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -8
app.py CHANGED
@@ -190,14 +190,14 @@ def _duration(prompt, negative_prompt, model, steps, guidance, width, height, se
190
  @spaces.GPU(duration=_duration, size="xlarge")
191
  def generate(
192
  prompt,
193
- negative_prompt,
194
- model,
195
- steps,
196
- guidance,
197
- width,
198
- height,
199
- seed,
200
- randomize,
201
  progress=gr.Progress(track_tqdm=True),
202
  ):
203
  if not prompt or not prompt.strip():
@@ -443,8 +443,12 @@ with gr.Blocks(title="Krea 2", fill_height=True) as demo:
443
  else:
444
  # No bundled sample images present; show the prompts as text.
445
  gr.Examples(
 
446
  examples=EXAMPLE_PROMPTS,
447
  inputs=[prompt],
 
 
 
448
  label="Example prompts",
449
  examples_per_page=4,
450
  )
 
190
  @spaces.GPU(duration=_duration, size="xlarge")
191
  def generate(
192
  prompt,
193
+ negative_prompt="",
194
+ model="Turbo",
195
+ steps=8,
196
+ guidance=0,
197
+ width=1024,
198
+ height=1024,
199
+ seed=42,
200
+ randomize=False,
201
  progress=gr.Progress(track_tqdm=True),
202
  ):
203
  if not prompt or not prompt.strip():
 
443
  else:
444
  # No bundled sample images present; show the prompts as text.
445
  gr.Examples(
446
+ fn=generate,
447
  examples=EXAMPLE_PROMPTS,
448
  inputs=[prompt],
449
+ outputs=[output, seed],
450
+ cache_examples=True,
451
+ cache_mode="lazy",
452
  label="Example prompts",
453
  examples_per_page=4,
454
  )