mzltest commited on
Commit
f21882b
1 Parent(s): 52f1758

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -77,6 +77,7 @@ def predict(image_url:str, score_threshold: float,
77
 
78
  # 将图片内容转换为Pillow.Image对象
79
  image = Image.open(BytesIO(response.content))
 
80
  rawimage = image
81
  _, height, width, _ = model.input_shape
82
  image = np.asarray(image)
 
77
 
78
  # 将图片内容转换为Pillow.Image对象
79
  image = Image.open(BytesIO(response.content))
80
+ image = image.convert("RGB")
81
  rawimage = image
82
  _, height, width, _ = model.input_shape
83
  image = np.asarray(image)