Annaig commited on
Commit
77a8ad2
1 Parent(s): 4b11fbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,11 +9,11 @@ def my_app(img):
9
  minSize=(20, 20))
10
  if len(analysedData) != 0:
11
  for (x, y, width, height) in analysedData:
12
- return cv2.rectangle(img, (x, y),
13
  (x + height, y + width),
14
- (0, 255, 0), 5)
15
  else:
16
  return cv2.imread("thumbs_up.jpg")
17
 
18
 
19
- gr.interface.Interface(fn=my_app, live=True, inputs="image", outputs="image").launch()
 
9
  minSize=(20, 20))
10
  if len(analysedData) != 0:
11
  for (x, y, width, height) in analysedData:
12
+ return (cv2.rectangle(img, (x, y),
13
  (x + height, y + width),
14
+ (0, 255, 0), 5), "STOP")
15
  else:
16
  return cv2.imread("thumbs_up.jpg")
17
 
18
 
19
+ gr.interface.Interface(fn=my_app, live=True, inputs="image", outputs=["image", "text"]).launch()