Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,9 +42,9 @@ def predict(frame_or_path):
|
|
42 |
return frame, {emotion: float(prob) for emotion, prob in zip(EMOTIONS, preds)}
|
43 |
|
44 |
# Define input and output components for Gradio
|
45 |
-
image_input = gr.
|
46 |
-
image_output = gr.
|
47 |
-
label_output = gr.
|
48 |
|
49 |
# Launch the Gradio interface
|
50 |
title = "Facial Emotion Recognition"
|
|
|
42 |
return frame, {emotion: float(prob) for emotion, prob in zip(EMOTIONS, preds)}
|
43 |
|
44 |
# Define input and output components for Gradio
|
45 |
+
image_input = gr.components.Image(sources=["webcam", "upload"], label="Your face")
|
46 |
+
image_output = gr.components.Image(label="Predicted Emotion")
|
47 |
+
label_output = gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
|
48 |
|
49 |
# Launch the Gradio interface
|
50 |
title = "Facial Emotion Recognition"
|