Spaces:
Sleeping
Sleeping
File size: 577 Bytes
70ca5d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import random
# Hardcoded emotionโresponse mapping
responses = {
"happiness": ["That's wonderful! ๐", "Great to hear! ๐"],
"sadness": ["I'm sorry you're feeling sad. ๐", "I hope things get better soon.๐ข"],
"anger": ["I understand you're upset. ๐ ", "Let's take a deep breath.๐"],
"fear": ["I hear your concern. ๐", "It's okay to feel anxious.๐"],
"neutral": ["Tell me more.", "Go on..."]
}
# Return one random reply per emotion
def get_response(emotion):
return random.choice(responses.get(emotion, responses["neutral"])) |