23A475R commited on
Commit
d2006b7
1 Parent(s): b125ffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.inputs.Image(sources=["webcam", "upload"], label="Your face")
46
- image_output = gr.outputs.Image(label="Predicted Emotion")
47
- label_output = gr.outputs.Label(num_top_classes=2, label="Top 2 Probabilities")
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"