saiachanta2728 / Ace_SA

1 stars 0 forks source link

RUN THE CODE AND TEST THE CODE #5

Open saiachanta2728 opened 7 months ago

saiachanta2728 commented 7 months ago

![Uploading saiiw353ei.png…]() import os from PIL import Image import rembg

Input and output paths

input_path = "/Users/saiachanta/Desktop/remove background.py/1.webp" output_path = "sai2722334re28.png"

Check if input file exists

if os.path.exists(input_path):

Check if the file is readable

if os.access(input_path, os.R_OK):
    # Open the input image
    input_image = Image.open(input_path)

    # Process the image
    output_image = rembg.remove(input_image)

    # Save the output image
    output_image.save(output_path)
    print("Background removed successfully!")
else:
    print("Permission denied: Unable to read the input image.")

else: print("Input image does not exist.")``

Add to @vamseeachanta @samdansk2 20240122_151714_no_bg giraffe-614141 newsaiimage_151714_no_bg

saiachanta2728 commented 7 months ago

this code was competed by @JayachandraJangiti he tested with the code and did some examples on it sir thank you sir @vamseeachanta

vamseeachanta commented 6 months ago

Good job. Will test it on my side and integrate it in my library.