from PIL import Image, ImageDraw, ImageFilter # Load the image image_path = '/mnt/data/Untitled73_20240531025447.png' image = Image.open(image_path) # Define the area of the text to be removed text_area = (130, 140, 380, 200) # Create a blurred version of the image to fill the text area blurred_image = image.filter(ImageFilter.GaussianBlur(10)) # Paste the blurred area back onto the original image to cover the text image.paste(blurred_image.crop(text_area), text_area) # Save the modified image output_path = '/mnt/data/text_removed.png' image.save(output_path) output_path