Spaces:
Sleeping
Sleeping
Dan Mo
commited on
Commit
·
dbad28d
1
Parent(s):
cfb0d15
Enhance Gradio interface with categorized emotion examples based on Plutchik's Wheel of Emotions
Browse files
app.py
CHANGED
@@ -144,15 +144,92 @@ class EmojiMashupApp:
|
|
144 |
outputs=[emotion_out, event_out, mashup_out]
|
145 |
)
|
146 |
|
147 |
-
# Examples
|
148 |
-
gr.Examples
|
149 |
-
|
150 |
-
|
151 |
-
[
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
return interface
|
158 |
|
|
|
144 |
outputs=[emotion_out, event_out, mashup_out]
|
145 |
)
|
146 |
|
147 |
+
# Examples based on Plutchik's Wheel of Emotions
|
148 |
+
with gr.Accordion("Examples", open=False):
|
149 |
+
gr.Markdown("### Primary Emotions")
|
150 |
+
gr.Examples(
|
151 |
+
examples=[
|
152 |
+
# Joy vs. Sadness
|
153 |
+
["I feel so happy and excited today!"],
|
154 |
+
["I'm feeling really sad and down right now"],
|
155 |
+
|
156 |
+
# Trust vs. Disgust
|
157 |
+
["I completely trust my best friend with my life"],
|
158 |
+
["That smells absolutely disgusting and makes me nauseous"],
|
159 |
+
|
160 |
+
# Fear vs. Anger
|
161 |
+
["I'm terrified of what might happen next"],
|
162 |
+
["I'm furious about how they treated me yesterday"],
|
163 |
+
|
164 |
+
# Surprise vs. Anticipation
|
165 |
+
["Wow! I can't believe what just happened - totally unexpected!"],
|
166 |
+
["I'm eagerly waiting to see what happens next"]
|
167 |
+
],
|
168 |
+
inputs=text_input,
|
169 |
+
label="Primary Emotions"
|
170 |
+
)
|
171 |
+
|
172 |
+
gr.Markdown("### Secondary Emotions")
|
173 |
+
gr.Examples(
|
174 |
+
examples=[
|
175 |
+
# Love (Joy + Trust)
|
176 |
+
["I deeply love and adore my family more than anything"],
|
177 |
+
|
178 |
+
# Submission (Trust + Fear)
|
179 |
+
["I respect their authority and will follow their instructions"],
|
180 |
+
|
181 |
+
# Awe (Fear + Surprise)
|
182 |
+
["I'm in awe of the magnificent view from the summit"],
|
183 |
+
|
184 |
+
# Disapproval (Surprise + Sadness)
|
185 |
+
["I'm disappointed by the unexpected poor quality of work"],
|
186 |
+
|
187 |
+
# Remorse (Sadness + Disgust)
|
188 |
+
["I feel so guilty and ashamed about what I did"],
|
189 |
+
|
190 |
+
# Contempt (Disgust + Anger)
|
191 |
+
["I have nothing but contempt for their dishonest behavior"],
|
192 |
+
|
193 |
+
# Aggressiveness (Anger + Anticipation)
|
194 |
+
["I'm determined to confront them about this issue"],
|
195 |
+
|
196 |
+
# Optimism (Anticipation + Joy)
|
197 |
+
["I'm optimistic and hopeful about what the future holds"]
|
198 |
+
],
|
199 |
+
inputs=text_input,
|
200 |
+
label="Secondary Emotions"
|
201 |
+
)
|
202 |
+
|
203 |
+
gr.Markdown("### Tertiary Emotions")
|
204 |
+
gr.Examples(
|
205 |
+
examples=[
|
206 |
+
# Anxiety (Anticipation + Fear)
|
207 |
+
["I'm feeling anxious about my upcoming presentation"],
|
208 |
+
|
209 |
+
# Hope (Anticipation + Trust)
|
210 |
+
["I'm hopeful that everything will work out in the end"],
|
211 |
+
|
212 |
+
# Jealousy (Anger + Trust)
|
213 |
+
["I felt jealous when I saw them together laughing"],
|
214 |
+
|
215 |
+
# Sentimentality (Trust + Sadness)
|
216 |
+
["Looking at old photos makes me feel nostalgic and sentimental"],
|
217 |
+
|
218 |
+
# Despair (Fear + Sadness)
|
219 |
+
["I'm in complete despair and see no way out of this situation"],
|
220 |
+
|
221 |
+
# Shame (Fear + Disgust)
|
222 |
+
["I'm so embarrassed and ashamed of my behavior yesterday"],
|
223 |
+
|
224 |
+
# Morbidness (Disgust + Joy)
|
225 |
+
["I have a strange fascination with creepy abandoned buildings"],
|
226 |
+
|
227 |
+
# Delight (Surprise + Joy)
|
228 |
+
["I was absolutely delighted by the unexpected gift"]
|
229 |
+
],
|
230 |
+
inputs=text_input,
|
231 |
+
label="Tertiary Emotions"
|
232 |
+
)
|
233 |
|
234 |
return interface
|
235 |
|