lionelgarnier commited on
Commit
b82ea97
·
1 Parent(s): 412c4ad

update examples format to nested list with required inputs

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -140,10 +140,12 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_in
140
  print(f"Error in infer: {str(e)}")
141
  return None, f"Error generating image: {str(e)}"
142
 
 
143
  examples = [
144
- "a backpack for kids, flower style",
145
- "medieval flip flops",
146
- "cat shaped cake mold",
 
147
  ]
148
 
149
  css="""
@@ -281,7 +283,7 @@ def create_interface():
281
 
282
  # Examples section - use the pipeline function for examples
283
  gr.Examples(
284
- examples=examples,
285
  fn=process_example_pipeline,
286
  inputs=[
287
  prompt,
 
140
  print(f"Error in infer: {str(e)}")
141
  return None, f"Error generating image: {str(e)}"
142
 
143
+ # Update examples to be a nested list with all required inputs
144
  examples = [
145
+ # Format: [prompt, seed, randomize_seed, width, height, num_inference_steps]
146
+ ["a backpack for kids, flower style", 42, True, 512, 512, 6],
147
+ ["medieval flip flops", 123, True, 512, 512, 6],
148
+ ["cat shaped cake mold", 456, True, 512, 512, 6],
149
  ]
150
 
151
  css="""
 
283
 
284
  # Examples section - use the pipeline function for examples
285
  gr.Examples(
286
+ examples=examples, # Now properly formatted as nested list
287
  fn=process_example_pipeline,
288
  inputs=[
289
  prompt,