Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,15 @@ def my_app(img):
|
|
| 9 |
analysedData = classifier.detectMultiScale(flipped_image,
|
| 10 |
minSize=(20, 20))
|
| 11 |
if len(analysedData) != 0:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
return ("S T O P !")
|
| 13 |
else:
|
|
|
|
| 14 |
return ("You're good to go :)")
|
| 15 |
|
| 16 |
|
| 17 |
-
gr.interface.Interface(fn=my_app, live=True, inputs=
|
| 18 |
-
source='webcam', streaming=True), outputs="text").launch()
|
|
|
|
| 9 |
analysedData = classifier.detectMultiScale(flipped_image,
|
| 10 |
minSize=(20, 20))
|
| 11 |
if len(analysedData) != 0:
|
| 12 |
+
for (x, y, width, height) in analysedData:
|
| 13 |
+
return cv2.rectangle(flipped_image, (x, y),
|
| 14 |
+
(x + height, y + width),
|
| 15 |
+
(0, 255, 0), 5)
|
| 16 |
+
return flipped_image
|
| 17 |
return ("S T O P !")
|
| 18 |
else:
|
| 19 |
+
return flipped_image
|
| 20 |
return ("You're good to go :)")
|
| 21 |
|
| 22 |
|
| 23 |
+
gr.interface.Interface(fn=my_app, live=True, inputs="image", outputs="image").launch()
|
|
|