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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -26,6 +26,7 @@ async def upload_image(file: UploadFile = File(...)):
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():
 
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
+ image = image.transpose(Image.FLIP_LEFT_RIGHT)
30
  # Chuyển đổi ảnh sang tensor
31
  img_tensor = transform(image).unsqueeze(0)
32
  with torch.no_grad():