23A475R commited on
Commit
fdc7694
1 Parent(s): 132b5af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -57,5 +57,16 @@ title = "Facial Emotion Recognition"
57
  description = "How well can this model predict your emotions? Take a picture with your webcam, or upload an image, and it will guess if you are happy, sad, angry, disgusted, scared, surprised, or neutral."
58
  thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognition/master/thumbnail.png"
59
 
60
- gr.Interface(fn=predict, inputs=image_input, outputs=output,
 
 
 
 
 
 
 
 
 
 
 
61
  title=title, description=description, thumbnail=thumbnail).launch()
 
57
  description = "How well can this model predict your emotions? Take a picture with your webcam, or upload an image, and it will guess if you are happy, sad, angry, disgusted, scared, surprised, or neutral."
58
  thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognition/master/thumbnail.png"
59
 
60
+ example_images = [
61
+ [
62
+ os.path.join(os.path.dirname(__file__), "images/chandler.jpeg"),
63
+ os.path.join(os.path.dirname(__file__), "images/janice.jpeg"),
64
+ os.path.join(os.path.dirname(__file__), "images/joey.jpeg"),
65
+ os.path.join(os.path.dirname(__file__), "images/phoebe.jpeg"),
66
+ os.path.join(os.path.dirname(__file__), "images/rachel_monica.jpeg"),
67
+ os.path.join(os.path.dirname(__file__), "images/ross.jpeg"),
68
+ os.path.join(os.path.dirname(__file__), "images/gunther.jpeg")
69
+ ]
70
+
71
+ gr.Interface(fn=predict, inputs=image_input, outputs=output, examples=example_images,
72
  title=title, description=description, thumbnail=thumbnail).launch()