Spaces:
Runtime error
Runtime error
init
Browse files- app.py +7 -7
- core.bin +0 -3
- imgs/cc.png +0 -0
- mic.bin +0 -3
- z_app_factory.so +0 -0
app.py
CHANGED
@@ -15,25 +15,25 @@ def inference(image):
|
|
15 |
if code == 401:
|
16 |
msg = "Not RGB three channel picture"
|
17 |
elif code == 402:
|
18 |
-
msg = "Pixels less than 32
|
19 |
elif code == 403:
|
20 |
-
msg = "Pixels greater than 4096
|
21 |
elif code == 404:
|
22 |
-
msg = "Files
|
23 |
elif code == 405:
|
24 |
msg = "System error, please contact\n the server for troubleshooting"
|
25 |
|
26 |
if code!=200:
|
27 |
img_out = np.zeros((500, 600,3),dtype=np.uint8)
|
28 |
-
cv2.putText(img_out, msg, (20,
|
29 |
return img_out
|
30 |
|
31 |
# img_out = np.zeros((500, 600, 3),dtype=np.uint8)
|
32 |
# cv2.putText(img_out, "ease contact the server for trouble", (20, 100), font, 0.8, (0, 255, 0), 2)
|
33 |
# return img_out
|
34 |
-
img_out = np.zeros((500, 600, 3), dtype=np.uint8)
|
35 |
-
cv2.putText(img_out, msg, (20, 20), font, 1, (0, 255, 0), 2)
|
36 |
-
return img_out
|
37 |
for face in lst2d_res:
|
38 |
|
39 |
bbox = [int(i) for i in face["bbox"]]
|
|
|
15 |
if code == 401:
|
16 |
msg = "Not RGB three channel picture"
|
17 |
elif code == 402:
|
18 |
+
msg = "Pixels less than 32 * 32"
|
19 |
elif code == 403:
|
20 |
+
msg = "Pixels greater than 4096 * 4096"
|
21 |
elif code == 404:
|
22 |
+
msg = "Files greater than 5MB"
|
23 |
elif code == 405:
|
24 |
msg = "System error, please contact\n the server for troubleshooting"
|
25 |
|
26 |
if code!=200:
|
27 |
img_out = np.zeros((500, 600,3),dtype=np.uint8)
|
28 |
+
cv2.putText(img_out, msg, (20, 200), font, 1, (0, 255, 0), 2)
|
29 |
return img_out
|
30 |
|
31 |
# img_out = np.zeros((500, 600, 3),dtype=np.uint8)
|
32 |
# cv2.putText(img_out, "ease contact the server for trouble", (20, 100), font, 0.8, (0, 255, 0), 2)
|
33 |
# return img_out
|
34 |
+
# img_out = np.zeros((500, 600, 3), dtype=np.uint8)
|
35 |
+
# cv2.putText(img_out, msg, (20, 20), font, 1, (0, 255, 0), 2)
|
36 |
+
# return img_out
|
37 |
for face in lst2d_res:
|
38 |
|
39 |
bbox = [int(i) for i in face["bbox"]]
|
core.bin
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e76e20bf4de2ba09de06c1af157ac4495e94d24d068622fc64b9fad49514567d
|
3 |
-
size 20956224
|
|
|
|
|
|
|
|
imgs/cc.png
CHANGED
![]() |
![]() |
mic.bin
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:30d98af37454b9bd878becb282a76752dd6dad9d7f986f7f8c4f14cbb3688db6
|
3 |
-
size 1876784
|
|
|
|
|
|
|
|
z_app_factory.so
DELETED
Binary file (677 kB)
|
|