n0no123 commited on
Commit
e02cf8f
1 Parent(s): e9b8227

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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(grayscale_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
 
 
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