Update app.py
Browse files
    	
        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():
         |