Spaces:
Runtime error
Runtime error
np and add debut
Browse files
app.py
CHANGED
@@ -17,9 +17,11 @@ output_layer = compiled_model.output(0)
|
|
17 |
#Inference
|
18 |
#####
|
19 |
def predict(img):
|
20 |
-
|
|
|
|
|
21 |
# https://stackoverflow.com/a/32264327
|
22 |
-
image = cv2.cvtColor(
|
23 |
|
24 |
# The MobileNet model expects images in RGB format.
|
25 |
#image = cv2.cvtColor(cv2.imread(img), code=cv2.COLOR_BGR2RGB)
|
|
|
17 |
#Inference
|
18 |
#####
|
19 |
def predict(img):
|
20 |
+
|
21 |
+
print(f'input type: {type(img)}')
|
22 |
+
|
23 |
# https://stackoverflow.com/a/32264327
|
24 |
+
image = cv2.cvtColor(np.array(img), cv2.COLOR_BGR2RGB)
|
25 |
|
26 |
# The MobileNet model expects images in RGB format.
|
27 |
#image = cv2.cvtColor(cv2.imread(img), code=cv2.COLOR_BGR2RGB)
|