paulb34 commited on
Commit
b3acf55
·
verified ·
1 Parent(s): d06cfed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -1
app.py CHANGED
@@ -192,7 +192,7 @@ with gr.Blocks(theme=theme, css=css) as app:
192
 
193
  # Add a button to trigger the image generation
194
  with gr.Row():
195
- text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
196
 
197
  # Image output area to display the generated image
198
  with gr.Row():
@@ -210,6 +210,27 @@ with gr.Blocks(theme=theme, css=css) as app:
210
  # Bind the button to the query function with the added width and height inputs
211
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
214
  if __name__ == "__main__":
215
  # Launch the Gradio app
 
192
 
193
  # Add a button to trigger the image generation
194
  with gr.Row():
195
+ text_button = gr.Button("Generate Image", variant='primary', elem_id="gen-button")
196
 
197
  # Image output area to display the generated image
198
  with gr.Row():
 
210
  # Bind the button to the query function with the added width and height inputs
211
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
212
 
213
+ with gr.Tab("ℹ️ Tips"):
214
+ with gr.Row():
215
+ with gr.Column():
216
+ gr.Markdown(
217
+ """
218
+ <div style="max-width: 650px; margin: 2rem auto; padding: 1rem; border-radius: 10px; background-color: #f0f0f0;">
219
+ <h2 style="float: left; font-size: 1.5rem; margin-bottom: 1rem;">How to Use</h2>
220
+ <ol style="padding-left: 1.5rem;">
221
+ <li>Add an image to generate a prompt, this is optional.</li>
222
+ <li>If using an image to prompt, copy the prompt and paste into the prompt on tab 2</li>
223
+ <li>Enter a detailed description of the image you want to create.</li>
224
+ <li>Adjust advanced settings if desired (tap to expand).</li>
225
+ <li>Tap "Generate Image" and wait for your creation!</li>
226
+ </ol>
227
+ <p style="margin-top: 1rem; font-style: italic;">Tip: Be specific in your description for best results!</p>
228
+ <p style="margin-top: 1rem; font-style: italic;">*Note: Some LoRA models will not work every time (not sure why), refresh the page and try again</p>
229
+ <p style="margin-top: 1rem; font-style: italic;">*I'm still playing around to try to sort the issue, feel free to let me know if you find a fix</p>
230
+ </div>
231
+ """
232
+ )
233
+
234
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
235
  if __name__ == "__main__":
236
  # Launch the Gradio app