Spaces:
Running
Running
Upload vision/image_generator.py with huggingface_hub
Browse files
vision/image_generator.py
CHANGED
|
@@ -66,9 +66,9 @@ def generate_image(
|
|
| 66 |
|
| 67 |
# Clean & watermark-strip pass using PIL:
|
| 68 |
with Image.open(out_path) as img:
|
| 69 |
-
# Crop off any potential bottom stamp if present
|
| 70 |
w, h = img.size
|
| 71 |
-
clean_img = img.crop((0, 0, w, h -
|
| 72 |
clean_img.save(out_path)
|
| 73 |
|
| 74 |
sz_kb = os.path.getsize(out_path) / 1024
|
|
|
|
| 66 |
|
| 67 |
# Clean & watermark-strip pass using PIL:
|
| 68 |
with Image.open(out_path) as img:
|
| 69 |
+
# Crop off any potential bottom stamp or logo if present
|
| 70 |
w, h = img.size
|
| 71 |
+
clean_img = img.crop((0, 0, w, h - 45))
|
| 72 |
clean_img.save(out_path)
|
| 73 |
|
| 74 |
sz_kb = os.path.getsize(out_path) / 1024
|