Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ async def upload_image(file: UploadFile = File(...)):
|
|
25 |
|
26 |
image = Image.open(io.BytesIO(image_bytes)).convert("RGB")
|
27 |
print("✅ Ảnh mở thành công!")
|
28 |
-
|
29 |
# Chuyển đổi ảnh sang tensor
|
30 |
img_tensor = transform(image).unsqueeze(0)
|
31 |
with torch.no_grad():
|
|
|
25 |
|
26 |
image = Image.open(io.BytesIO(image_bytes)).convert("RGB")
|
27 |
print("✅ Ảnh mở thành công!")
|
28 |
+
image = image.transpose(Image.FLIP_TOP_BOTTOM)
|
29 |
# Chuyển đổi ảnh sang tensor
|
30 |
img_tensor = transform(image).unsqueeze(0)
|
31 |
with torch.no_grad():
|