DigiP-AI commited on
Commit
9656d81
·
verified ·
1 Parent(s): b0f4400

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -26
app.py CHANGED
@@ -220,34 +220,36 @@ with gr.Blocks(theme=theme, css=css) as app:
220
 
221
 
222
  with gr.TabItem("🔄 Flip Image", visible=True):
223
- with gr.Row():
224
- image_input = gr.Image(label="Upload Image", height=320, type="filepath")
225
- image_output = gr.Image(format="png")
226
- with gr.Row():
227
- image_button = gr.Button("Run", variant='primary')
228
- image_button.click(flip_image, inputs=image_input, outputs=image_output)
229
- with gr.Row():
230
- clear_results = gr.Button(value="Clear Image", variant="primary", elem_id="clear_button")
231
- clear_results.click(lambda: (None, None), None, [image_input, image_output])
 
232
 
233
  with gr.TabItem("ℹ️ Tips", visible=True):
234
- with gr.Row():
235
- with gr.Column():
236
- gr.Markdown(
237
- """
238
- <div style="max-width: 650px; margin: 2rem auto; padding: 1rem; border-radius: 10px; background-color: #f0f0f0;">
239
- <h2 style="float: left; font-size: 1.5rem; margin-bottom: 1rem;">How to Use</h2>
240
- <ol style="padding-left: 1.5rem;">
241
- <li>Add an image to generate a prompt, this is optional.</li>
242
- <li>If using an image to prompt, copy the prompt and paste into the prompt on tab 2</li>
243
- <li>Enter a detailed description of the image you want to create.</li>
244
- <li>Adjust advanced settings if desired (tap to expand).</li>
245
- <li>Tap "Generate Image" and wait for your creation!</li>
246
- </ol>
247
- <p style="margin-top: 1rem; font-style: italic;">Tip: Be specific in your description for best results!</p>
248
- </div>
249
- """
250
- )
 
251
 
252
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
253
  if __name__ == "__main__":
 
220
 
221
 
222
  with gr.TabItem("🔄 Flip Image", visible=True):
223
+ with gr.Column():
224
+ with gr.Row():
225
+ image_input = gr.Image(label="Upload Image", height=320, type="filepath")
226
+ image_output = gr.Image(format="png")
227
+ with gr.Row():
228
+ image_button = gr.Button("Run", variant='primary')
229
+ image_button.click(flip_image, inputs=image_input, outputs=image_output)
230
+ with gr.Row():
231
+ clear_results = gr.Button(value="Clear Image", variant="primary", elem_id="clear_button")
232
+ clear_results.click(lambda: (None, None), None, [image_input, image_output])
233
 
234
  with gr.TabItem("ℹ️ Tips", visible=True):
235
+ with gr.Column():
236
+ with gr.Row():
237
+ with gr.Column():
238
+ gr.Markdown(
239
+ """
240
+ <div style="max-width: 650px; margin: 2rem auto; padding: 1rem; border-radius: 10px; background-color: #f0f0f0;">
241
+ <h2 style="float: left; font-size: 1.5rem; margin-bottom: 1rem;">How to Use</h2>
242
+ <ol style="padding-left: 1.5rem;">
243
+ <li>Add an image to generate a prompt, this is optional.</li>
244
+ <li>If using an image to prompt, copy the prompt and paste into the prompt on tab 2</li>
245
+ <li>Enter a detailed description of the image you want to create.</li>
246
+ <li>Adjust advanced settings if desired (tap to expand).</li>
247
+ <li>Tap "Generate Image" and wait for your creation!</li>
248
+ </ol>
249
+ <p style="margin-top: 1rem; font-style: italic;">Tip: Be specific in your description for best results!</p>
250
+ </div>
251
+ """
252
+ )
253
 
254
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
255
  if __name__ == "__main__":