Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,7 +90,7 @@ def classify_clip(image, obj_name):
|
|
| 90 |
def pipeline(image):
|
| 91 |
# Gradio 會回傳 numpy array,因此先轉換
|
| 92 |
if isinstance(image, np.ndarray):
|
| 93 |
-
|
| 94 |
image.save("temp.jpg")
|
| 95 |
|
| 96 |
# 1. GroundingDINO 偵測物品
|
|
|
|
| 90 |
def pipeline(image):
|
| 91 |
# Gradio 會回傳 numpy array,因此先轉換
|
| 92 |
if isinstance(image, np.ndarray):
|
| 93 |
+
image = Image.fromarray(image.astype("uint8"))
|
| 94 |
image.save("temp.jpg")
|
| 95 |
|
| 96 |
# 1. GroundingDINO 偵測物品
|