Tonic commited on
Commit
d89af39
β€’
1 Parent(s): c405c33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -54,13 +54,21 @@ with gr.Blocks() as demo:
54
  gr.Textbox(label="Prompts to generate images (separate with new lines)", lines=5)
55
  with gr.Accordion(label="Advanced Settings"):
56
  with gr.Row():
57
- gr.Number(value=1.1, label="shared_score_shift", minimum=1.0, maximum=2.0, step=0.05)
58
- gr.Number(value=1.0, label="shared_score_scale", minimum=0.0, maximum=1.0, step=0.05)
59
- gr.Number(value=10.0, label="guidance_scale", minimum=5.0, maximum=20.0, step=1)
60
- gr.Number(value=12, label="num_inference_steps", minimum=1, maximum=12, step=1)
61
  gr.Checkbox(False, label="Large (1024x1024)")
62
- gr.Number(value=0, label="seed (0 for random)", minimum=0, maximum=1000000, step=42)
63
  with gr.Row():
64
- gr.Gallery()
 
 
 
 
 
 
 
 
65
 
66
  demo.launch()
 
54
  gr.Textbox(label="Prompts to generate images (separate with new lines)", lines=5)
55
  with gr.Accordion(label="Advanced Settings"):
56
  with gr.Row():
57
+ gr.Slider(value=1.1, label="shared_score_shift", minimum=1.0, maximum=2.0, step=0.05)
58
+ gr.Slider(value=1.0, label="shared_score_scale", minimum=0.0, maximum=1.0, step=0.05)
59
+ gr.Slider(value=10.0, label="guidance_scale", minimum=5.0, maximum=20.0, step=1)
60
+ gr.Slider(value=12, label="num_inference_steps", minimum=1, maximum=12, step=1)
61
  gr.Checkbox(False, label="Large (1024x1024)")
62
+ gr.Slider(value=0, label="seed (0 for random)", minimum=0, maximum=1000000, step=42)
63
  with gr.Row():
64
+ run_button = gr.Button("Generate Images")
65
+ with gr.Row():
66
+ output_gallery = gr.Gallery()
67
+
68
+ run_button.click(
69
+ run,
70
+ inputs=[image_input, style_input, image_desc_input, prompts_input, shared_score_shift_input, shared_score_scale_input, guidance_scale_input, num_inference_steps_input, large_input, seed_input],
71
+ outputs=output_gallery
72
+ )
73
 
74
  demo.launch()