Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ def detect_objects_in_image(image):
|
|
85 |
print(np.array(image))
|
86 |
print(type(image))
|
87 |
if len(pred) == 0:
|
88 |
-
return Image.fromarray(np.array(image))
|
89 |
print("passed6")
|
90 |
boxes, scores, class_probs = pred[:, :4], pred[:, 4], pred[:, 5:]
|
91 |
class_ids = np.argmax(class_probs, axis=1)
|
|
|
85 |
print(np.array(image))
|
86 |
print(type(image))
|
87 |
if len(pred) == 0:
|
88 |
+
return Image.fromarray(np.array(image)) # Return only image and None for graph
|
89 |
print("passed6")
|
90 |
boxes, scores, class_probs = pred[:, :4], pred[:, 4], pred[:, 5:]
|
91 |
class_ids = np.argmax(class_probs, axis=1)
|