Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -27,22 +27,23 @@ def my_app(img):
|
|
27 |
amount_found = len(found)
|
28 |
|
29 |
if amount_found != 0:
|
30 |
-
|
31 |
# There may be more than one
|
32 |
# sign in the image
|
33 |
-
for (x, y, width, height) in found:
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
# Creates the environment of
|
42 |
# the picture and shows it
|
43 |
plt.subplot(1, 1, 1)
|
44 |
plt.imshow(img_rgb)
|
45 |
plt.show()
|
|
|
46 |
|
47 |
|
48 |
gr.interface.Interface(fn=my_app, live=True, inputs=gr.Image(
|
|
|
27 |
amount_found = len(found)
|
28 |
|
29 |
if amount_found != 0:
|
30 |
+
return ("S T O P!")
|
31 |
# There may be more than one
|
32 |
# sign in the image
|
33 |
+
# for (x, y, width, height) in found:
|
34 |
|
35 |
+
# # We draw a green rectangle around
|
36 |
+
# # every recognized sign
|
37 |
+
# cv2.rectangle(img_rgb, (x, y),
|
38 |
+
# (x + height, y + width),
|
39 |
+
# (0, 255, 0), 5)
|
40 |
|
41 |
# Creates the environment of
|
42 |
# the picture and shows it
|
43 |
plt.subplot(1, 1, 1)
|
44 |
plt.imshow(img_rgb)
|
45 |
plt.show()
|
46 |
+
return ("S T O P!")
|
47 |
|
48 |
|
49 |
gr.interface.Interface(fn=my_app, live=True, inputs=gr.Image(
|