Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,12 @@ import gradio as gr
|
|
5 |
|
6 |
def my_app(img):
|
7 |
grayscale_image = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
|
|
8 |
classifier = cv2.CascadeClassifier('classifier.xml')
|
9 |
-
analysedData = classifier.detectMultiScale(
|
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 |
|
|
|
5 |
|
6 |
def my_app(img):
|
7 |
grayscale_image = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
|
8 |
+
flipped_image = cv2.flip(grayscale_image, 1)
|
9 |
classifier = cv2.CascadeClassifier('classifier.xml')
|
10 |
+
analysedData = classifier.detectMultiScale(flipped_image,
|
11 |
minSize=(20, 20))
|
12 |
if len(analysedData) != 0:
|
13 |
+
return ("S T O P !")
|
14 |
else:
|
15 |
return ("You're good to go :)")
|
16 |
|