wai572 commited on
Commit
4aac08d
·
1 Parent(s): c9b36dd

convert .read

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -126,8 +126,8 @@ async def analyze_image(image_paths: list[UploadFile]):
126
  # bytearray(f.read()), dtype=np.uint8
127
  # )
128
  # NumPy配列(メモリ上のデータ)から画像をデコード
129
- # image = cv2.imdecode(file_bytes, cv2.IMREAD_COLOR)
130
- image = image_path.file
131
 
132
  if image is None:
133
  raise (
 
126
  # bytearray(f.read()), dtype=np.uint8
127
  # )
128
  # NumPy配列(メモリ上のデータ)から画像をデコード
129
+ image = cv2.imdecode(await image_path.file.read(), cv2.IMREAD_COLOR)
130
+ # image = image_path.file
131
 
132
  if image is None:
133
  raise (