SarahMarzouq commited on
Commit
3df1cf0
1 Parent(s): af1d4c9

Create app.py

Browse files

git add app.py && git commit -m 'Add application file' && git push

Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def motivate(mood):
4
+ if mood.lower() in ["happy", "excited", "joyful"]:
5
+ return "That's awesome! Keep riding the wave of positivity!"
6
+ elif mood.lower() in ["sad", "down", "unhappy"]:
7
+ return "It's okay to feel this way sometimes. Remember, after every storm, there's a rainbow!"
8
+ elif mood.lower() in ["tired", "exhausted", "drained"]:
9
+ return "Take a deep breath, rest if you need to, and come back stronger!"
10
+ elif mood.lower() in ["anxious", "nervous", "worried"]:
11
+ return "Stay calm, focus on what you can control, and take things one step at a time."
12
+ else:
13
+ return "No matter how you feel, you're doing great! Keep going!"
14
+
15
+ demo = gr.Interface(fn=motivate, inputs="text", outputs="text")
16
+ demo.launch()
17
+