Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,6 +72,15 @@ out = [
|
|
72 |
gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
|
73 |
]
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
title = "Facial Emotion Recognition"
|
77 |
description = "How well can this model predict your emotions? Take a picture with your webcam, and it will guess if" \
|
@@ -81,16 +90,7 @@ thumbnail = "https://raw.githubusercontent.com/gradio-app/hub-emotion-recognitio
|
|
81 |
# gr.Interface(predict, inp, out, capture_session=True, title=title, thumbnail=thumbnail,
|
82 |
# description=description).launch(inbrowser=True)
|
83 |
gr.Interface(fn=predict, inputs=inp, outputs=out,
|
84 |
-
|
85 |
-
os.path.join(os.path.dirname(__file__), "images/chandler.jpeg"),
|
86 |
-
os.path.join(os.path.dirname(__file__), "images/janice.jpg"),
|
87 |
-
os.path.join(os.path.dirname(__file__), "images/joey.jpg"),
|
88 |
-
os.path.join(os.path.dirname(__file__), "images/phoebe.jpg"),
|
89 |
-
os.path.join(os.path.dirname(__file__), "images/rachel_monica.jpg"),
|
90 |
-
os.path.join(os.path.dirname(__file__), "images/ross.jpg"),
|
91 |
-
os.path.join(os.path.dirname(__file__), "images/gunther.jpg"),
|
92 |
-
|
93 |
-
],title=title, thumbnail=thumbnail).launch()
|
94 |
|
95 |
|
96 |
|
|
|
72 |
gr.components.Label(num_top_classes=2, label="Top 2 Probabilities")
|
73 |
]
|
74 |
|
75 |
+
example_images = [
|
76 |
+
["images/chandler.jpeg"],
|
77 |
+
["images/janice.jpg"],
|
78 |
+
["images/joey.jpg"],
|
79 |
+
["images/phoebe.jpg"],
|
80 |
+
["images/rachel_monica.jpg"],
|
81 |
+
["images/ross.jpg"],
|
82 |
+
["images/gunther.jpg"]
|
83 |
+
]
|
84 |
|
85 |
title = "Facial Emotion Recognition"
|
86 |
description = "How well can this model predict your emotions? Take a picture with your webcam, and it will guess if" \
|
|
|
90 |
# gr.Interface(predict, inp, out, capture_session=True, title=title, thumbnail=thumbnail,
|
91 |
# description=description).launch(inbrowser=True)
|
92 |
gr.Interface(fn=predict, inputs=inp, outputs=out,
|
93 |
+
examples=example_images,title=title, thumbnail=thumbnail).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
|
96 |
|