muhammadsalmanalfaridzi commited on
Commit
41b67ce
·
verified ·
1 Parent(s): 0160002

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -431,13 +431,13 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
431
 
432
  1. **✏️ Text to Image**: Transform your ideas into stunning visuals by simply entering a descriptive text prompt. Watch your imagination come to life!
433
 
434
- 2. **🖼️ Text Image to Image**: Enhance existing images by providing a text description of the modifications you want. Upload any image and specify the changes as you wish to create a unique masterpiece.
435
 
436
  3. **🖌️ Image Background Removal and Resizing**: Effortlessly remove backgrounds from images, resize them, and even add watermarks (opitonal). Upload single images or zip files, choose your desired settings, and let our tool process everything seamlessly.
437
  """)
438
 
439
  # Fitur Text to Image
440
- gr.Markdown("## ✏️ Text to Image Feature")
441
  gr.Markdown("""
442
  **Example Prompts:**
443
  - *A serene mountain landscape at sunset.*
@@ -447,6 +447,9 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
447
 
448
  This feature allows you to create a new image based on a text description. Simply enter your idea in a sentence, and the system will generate an image that matches it.
449
  """)
 
 
 
450
  with gr.Row():
451
  prompt_input = gr.Textbox(label="Enter your prompt for image generation:")
452
  generate_button = gr.Button("Generate Image")
@@ -456,7 +459,7 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
456
  generate_button.click(text_to_image, inputs=prompt_input, outputs=[output_image, download_button])
457
 
458
  # Fitur Text Image to Image
459
- gr.Markdown("## 🖼️ Text Image to Image Feature")
460
  gr.Markdown("""
461
  **Example Prompts:**
462
  - *Change the sky to a starry night with a full moon.*
@@ -466,6 +469,9 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
466
 
467
  This feature lets you modify an existing image by adding a text description. Upload an image, specify what you want to change, and the system will alter the image accordingly.
468
  """)
 
 
 
469
  with gr.Row():
470
  input_image = gr.Image(label="Upload Image for Modification", type="pil")
471
  prompt_modification = gr.Textbox(label="Enter your prompt for modification:")
@@ -475,7 +481,7 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
475
 
476
  modify_button.click(text_image_to_image, inputs=[input_image, prompt_modification], outputs=[modified_output_image, download_modified_button])
477
 
478
- gr.Markdown("## 🖌️ Image Background Removal and Resizing with Optional Watermark")
479
  gr.Markdown("Choose to upload multiple images or a ZIP/RAR file, select the crop mode, optionally upload a watermark image, and choose the output format.")
480
 
481
  with gr.Row():
@@ -510,7 +516,4 @@ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as iface:
510
  process_button.click(process, inputs=[input_files, bg_method, watermark, canvas_size, output_format, bg_choice, custom_color, num_workers], outputs=[gallery_processed, output_zip, processing_time])
511
  gallery_processed.select(update_compare, outputs=[image_original, image_processed, original_ratio, processed_ratio])
512
 
513
- gr.Markdown("### ⚠️ Note:")
514
- gr.Markdown("Processing may take a while due to the free CPU resources on Hugging Face Spaces. Please be patient!")
515
-
516
  iface.launch(share=True)
 
431
 
432
  1. **✏️ Text to Image**: Transform your ideas into stunning visuals by simply entering a descriptive text prompt. Watch your imagination come to life!
433
 
434
+ 2. **🖼️ Image to Image**: Enhance existing images by providing a text description of the modifications you want. Upload any image and specify the changes as you wish to create a unique masterpiece.
435
 
436
  3. **🖌️ Image Background Removal and Resizing**: Effortlessly remove backgrounds from images, resize them, and even add watermarks (opitonal). Upload single images or zip files, choose your desired settings, and let our tool process everything seamlessly.
437
  """)
438
 
439
  # Fitur Text to Image
440
+ gr.Markdown("## Text to Image Feature")
441
  gr.Markdown("""
442
  **Example Prompts:**
443
  - *A serene mountain landscape at sunset.*
 
447
 
448
  This feature allows you to create a new image based on a text description. Simply enter your idea in a sentence, and the system will generate an image that matches it.
449
  """)
450
+ gr.Markdown("### ⚠️ Note:")
451
+ gr.Markdown("Processing may take a while due to the free CPU resources on Hugging Face Spaces. Please be patient!")
452
+
453
  with gr.Row():
454
  prompt_input = gr.Textbox(label="Enter your prompt for image generation:")
455
  generate_button = gr.Button("Generate Image")
 
459
  generate_button.click(text_to_image, inputs=prompt_input, outputs=[output_image, download_button])
460
 
461
  # Fitur Text Image to Image
462
+ gr.Markdown("## Image to Image Feature")
463
  gr.Markdown("""
464
  **Example Prompts:**
465
  - *Change the sky to a starry night with a full moon.*
 
469
 
470
  This feature lets you modify an existing image by adding a text description. Upload an image, specify what you want to change, and the system will alter the image accordingly.
471
  """)
472
+ gr.Markdown("### ⚠️ Note:")
473
+ gr.Markdown("Processing may take a while due to the free CPU resources on Hugging Face Spaces. Please be patient!")
474
+
475
  with gr.Row():
476
  input_image = gr.Image(label="Upload Image for Modification", type="pil")
477
  prompt_modification = gr.Textbox(label="Enter your prompt for modification:")
 
481
 
482
  modify_button.click(text_image_to_image, inputs=[input_image, prompt_modification], outputs=[modified_output_image, download_modified_button])
483
 
484
+ gr.Markdown("## Image Background Removal and Resizing with Optional Watermark")
485
  gr.Markdown("Choose to upload multiple images or a ZIP/RAR file, select the crop mode, optionally upload a watermark image, and choose the output format.")
486
 
487
  with gr.Row():
 
516
  process_button.click(process, inputs=[input_files, bg_method, watermark, canvas_size, output_format, bg_choice, custom_color, num_workers], outputs=[gallery_processed, output_zip, processing_time])
517
  gallery_processed.select(update_compare, outputs=[image_original, image_processed, original_ratio, processed_ratio])
518
 
 
 
 
519
  iface.launch(share=True)