sunbv56 commited on
Commit
8e1fa2b
·
verified ·
1 Parent(s): a18913a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -26,8 +26,7 @@ def load_image_as_bytes(image_path):
26
  img.save(img_bytes, format="JPEG") # Lưu ảnh vào buffer
27
  return img_bytes.getvalue() # Lấy dữ liệu nhị phân
28
  except FileNotFoundError:
29
- print(f"❌ Lỗi: Không tìm thấy file
30
- {image_path}")
31
  return None
32
  except UnidentifiedImageError:
33
  print(f"❌ Lỗi: Không thể mở file {image_path} (định dạng không hợp lệ)")
 
26
  img.save(img_bytes, format="JPEG") # Lưu ảnh vào buffer
27
  return img_bytes.getvalue() # Lấy dữ liệu nhị phân
28
  except FileNotFoundError:
29
+ print(f"❌ Lỗi: Không tìm thấy file {image_path}")
 
30
  return None
31
  except UnidentifiedImageError:
32
  print(f"❌ Lỗi: Không thể mở file {image_path} (định dạng không hợp lệ)")