23A475R commited on
Commit
2578cc6
1 Parent(s): 217243b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -60,10 +60,10 @@ EMOTIONS = ['neutral','happiness','surprise','sadness','anger','disgust','fear',
60
  # gr.components.Image(label="Predicted Emotion"),
61
  # gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
62
  # ]
63
- title = "Facial Emotion Recognition"
64
- description = "How well can this model predict your emotions? Take a picture with your webcam, and it will guess if" \
65
- " you are: happy, sad, angry, disgusted, scared, surprised, or neutral."
66
- thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognition/master/thumbnail.png"
67
 
68
  # # gr.Interface(predict, inp, out, capture_session=True, title=title, thumbnail=thumbnail,
69
  # # description=description).launch(inbrowser=True)
@@ -111,7 +111,12 @@ inp = gr.components.Video(sources="webcam", label="Your face")
111
  out = [
112
  gr.components.Video(label="Predicted Emotion"),
113
  gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
114
- ]
 
 
 
 
 
115
 
116
  gr.Interface(fn=predict, inputs=inp, outputs=out, title=title, thumbnail=thumbnail).launch()
117
 
 
60
  # gr.components.Image(label="Predicted Emotion"),
61
  # gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
62
  # ]
63
+ # title = "Facial Emotion Recognition"
64
+ # description = "How well can this model predict your emotions? Take a picture with your webcam, and it will guess if" \
65
+ # " you are: happy, sad, angry, disgusted, scared, surprised, or neutral."
66
+ # thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognition/master/thumbnail.png"
67
 
68
  # # gr.Interface(predict, inp, out, capture_session=True, title=title, thumbnail=thumbnail,
69
  # # description=description).launch(inbrowser=True)
 
111
  out = [
112
  gr.components.Video(label="Predicted Emotion"),
113
  gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
114
+ ]
115
+
116
+ title = "Facial Emotion Recognition"
117
+ description = "How well can this model predict your emotions? Take a picture with your webcam, and it will guess if" \
118
+ " you are: happy, sad, angry, disgusted, scared, surprised, or neutral."
119
+ thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognition/master/thumbnail.png"
120
 
121
  gr.Interface(fn=predict, inputs=inp, outputs=out, title=title, thumbnail=thumbnail).launch()
122