Spaces:
Runtime error
Runtime error
init
Browse files
app.py
CHANGED
@@ -38,14 +38,13 @@ def inference(image):
|
|
38 |
msg = "Files greater than 5MB"
|
39 |
elif code == 405:
|
40 |
msg = "System error, please contact\n the server for troubleshooting"
|
41 |
-
|
|
|
42 |
if code!=200:
|
43 |
-
img_out = np.zeros((500, 600,3),dtype=np.uint8)
|
44 |
cv2.putText(img_out, msg, (20, 200), font, 1, (0, 255, 0), 2)
|
45 |
return img_out
|
46 |
|
47 |
if code==200 and not lst2d_res:
|
48 |
-
img_out = np.zeros((500, 600,3),dtype=np.uint8)
|
49 |
cv2.putText(img_out, "no face detected", (20, 200), font, 1, (0, 255, 0), 2)
|
50 |
return img_out
|
51 |
|
|
|
38 |
msg = "Files greater than 5MB"
|
39 |
elif code == 405:
|
40 |
msg = "System error, please contact\n the server for troubleshooting"
|
41 |
+
import numpy as np
|
42 |
+
img_out = np.zeros((500, 600, 3), dtype=np.uint8)
|
43 |
if code!=200:
|
|
|
44 |
cv2.putText(img_out, msg, (20, 200), font, 1, (0, 255, 0), 2)
|
45 |
return img_out
|
46 |
|
47 |
if code==200 and not lst2d_res:
|
|
|
48 |
cv2.putText(img_out, "no face detected", (20, 200), font, 1, (0, 255, 0), 2)
|
49 |
return img_out
|
50 |
|