adpro commited on
Commit
0618751
·
verified ·
1 Parent(s): e3a3539

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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():