Spaces:
Runtime error
Runtime error
codevlogger2003
commited on
Commit
•
509e709
1
Parent(s):
4cb596c
Updated app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def main(options):
|
|
47 |
|
48 |
|
49 |
progress_bar.empty()
|
50 |
-
|
51 |
gray_frame = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
52 |
faces = cascade.detectMultiScale(gray_frame, 1.1, 3)
|
53 |
faces = sorted(faces, key=lambda f: -f[2] * f[3])
|
@@ -73,9 +73,10 @@ def main(options):
|
|
73 |
|
74 |
if 'dominant_race' in user_selected_items:
|
75 |
emotion_label='Race: '+str(result[0]['dominant_race']).title()
|
76 |
-
cv2.putText(image, emotion_label, (x, y+h+150), cv2.FONT_ITALIC,1 ,(
|
77 |
|
78 |
st.image(image, channels='BGR')
|
|
|
79 |
|
80 |
|
81 |
|
|
|
47 |
|
48 |
|
49 |
progress_bar.empty()
|
50 |
+
|
51 |
gray_frame = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
52 |
faces = cascade.detectMultiScale(gray_frame, 1.1, 3)
|
53 |
faces = sorted(faces, key=lambda f: -f[2] * f[3])
|
|
|
73 |
|
74 |
if 'dominant_race' in user_selected_items:
|
75 |
emotion_label='Race: '+str(result[0]['dominant_race']).title()
|
76 |
+
cv2.putText(image, emotion_label, (x, y+h+150), cv2.FONT_ITALIC,1 ,(255,255,255), 2)
|
77 |
|
78 |
st.image(image, channels='BGR')
|
79 |
+
st.balloons()
|
80 |
|
81 |
|
82 |
|