File size: 781 Bytes
3df1cf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

def motivate(mood):
    if mood.lower() in ["happy", "excited", "joyful"]:
        return "That's awesome! Keep riding the wave of positivity!"
    elif mood.lower() in ["sad", "down", "unhappy"]:
        return "It's okay to feel this way sometimes. Remember, after every storm, there's a rainbow!"
    elif mood.lower() in ["tired", "exhausted", "drained"]:
        return "Take a deep breath, rest if you need to, and come back stronger!"
    elif mood.lower() in ["anxious", "nervous", "worried"]:
        return "Stay calm, focus on what you can control, and take things one step at a time."
    else:
        return "No matter how you feel, you're doing great! Keep going!"

demo = gr.Interface(fn=motivate, inputs="text", outputs="text")
demo.launch()