Spaces:
Runtime error
Runtime error
Update app.py
#3
by
jamatas
- opened
app.py
CHANGED
@@ -5,6 +5,8 @@ import imutils
|
|
5 |
import cv2
|
6 |
from keras.models import load_model
|
7 |
import numpy as np
|
|
|
|
|
8 |
|
9 |
# parameters for loading data and images
|
10 |
detection_model_path = 'haarcascade_frontalface_default.xml'
|
@@ -58,10 +60,10 @@ def predict(frame):
|
|
58 |
return frameClone, probs
|
59 |
|
60 |
|
61 |
-
inp = gr.
|
62 |
out = [
|
63 |
-
gr.
|
64 |
-
gr.
|
65 |
]
|
66 |
title = "Reconocimiento de emociones"
|
67 |
article = "Es posible que una mala iluminación impida la detección del rostro"
|
|
|
5 |
import cv2
|
6 |
from keras.models import load_model
|
7 |
import numpy as np
|
8 |
+
from gradio.components import Image
|
9 |
+
from gradio.components import Label
|
10 |
|
11 |
# parameters for loading data and images
|
12 |
detection_model_path = 'haarcascade_frontalface_default.xml'
|
|
|
60 |
return frameClone, probs
|
61 |
|
62 |
|
63 |
+
inp = gr.Image(source="webcam")
|
64 |
out = [
|
65 |
+
gr.Image(label="Emoción detectada"),
|
66 |
+
gr.Label(num_top_classes=2, label="Posibles emociones detectadas")
|
67 |
]
|
68 |
title = "Reconocimiento de emociones"
|
69 |
article = "Es posible que una mala iluminación impida la detección del rostro"
|