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