Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,10 +162,6 @@ def preprocess_image(image_data):
|
|
| 162 |
try:
|
| 163 |
# Convert bytes to PIL Image
|
| 164 |
image = Image.open(io.BytesIO(image_data)).convert("RGB")
|
| 165 |
-
|
| 166 |
-
# Crop (x1=450, y1=400, x2=1090, y2=1060)
|
| 167 |
-
crop_box = (450, 140, 1090, 800)
|
| 168 |
-
image = image.crop(crop_box)
|
| 169 |
|
| 170 |
# Resize to model input size
|
| 171 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|
|
|
|
| 162 |
try:
|
| 163 |
# Convert bytes to PIL Image
|
| 164 |
image = Image.open(io.BytesIO(image_data)).convert("RGB")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
# Resize to model input size
|
| 167 |
image = image.resize((224, 224), Image.Resampling.LANCZOS)
|