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"]))