paulb34 commited on
Commit
a2abc5c
·
verified ·
1 Parent(s): 95e45b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -80,6 +80,12 @@ footer{display:none !important}
80
  }
81
  """
82
 
 
 
 
 
 
 
83
  # Build the Gradio UI with Blocks
84
  with gr.Blocks(theme=theme, css=css) as app:
85
  # Add a title to the app
@@ -113,9 +119,18 @@ with gr.Blocks(theme=theme, css=css) as app:
113
  # Image output area to display the generated image
114
  with gr.Row():
115
  image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
 
 
 
 
 
 
116
 
117
  # Bind the button to the query function with the added width and height inputs
118
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
119
 
120
- # Launch the Gradio app
121
- app.launch(show_api=False, share=True)
 
 
 
 
80
  }
81
  """
82
 
83
+ examples = [
84
+ "a beautiful woman with blonde hair and blue eyes",
85
+ "a beautiful woman with brown hair and grey eyes",
86
+ "a beautiful woman with black hair and brown eyes",
87
+ ]
88
+
89
  # Build the Gradio UI with Blocks
90
  with gr.Blocks(theme=theme, css=css) as app:
91
  # Add a title to the app
 
119
  # Image output area to display the generated image
120
  with gr.Row():
121
  image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
122
+
123
+ with gr.Row():
124
+ gr.Examples(
125
+ examples = examples,
126
+ inputs = [text_prompt],
127
+ )
128
 
129
  # Bind the button to the query function with the added width and height inputs
130
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
131
 
132
+ app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
133
+ if __name__ == "__main__":
134
+ # Launch the Gradio app
135
+ app.launch(show_api=False, share=True)
136
+