Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,24 @@ from Gradio_UI import GradioUI
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 13 |
-
|
| 14 |
-
|
| 15 |
Args:
|
| 16 |
-
|
| 17 |
-
arg2: the second argument
|
| 18 |
"""
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 13 |
+
"""Returns a short motivational alarm message based on the user's mood.
|
| 14 |
+
|
| 15 |
Args:
|
| 16 |
+
mood: The user's current mood (e.g., 'happy', 'sad', 'bored', 'curious').
|
|
|
|
| 17 |
"""
|
| 18 |
+
mood = mood.lower()
|
| 19 |
+
|
| 20 |
+
messages = {
|
| 21 |
+
"happy": "Rise and shine! Let that joy fuel your day with coffee 🌞",
|
| 22 |
+
"sad": "Each morning is a fresh start — you've got this 💪",
|
| 23 |
+
"bored": "Wake up and build something unexpected today 🚀",
|
| 24 |
+
"curious": "The world is full of wonders — go explore it 🔍",
|
| 25 |
+
"tired": "Deep breath. Small steps with coffee. Big difference ☕",
|
| 26 |
+
"anxious": "You don't have to control everything — just begin 🌿",
|
| 27 |
+
"motivated": "Let’s make today count — go do something great! 🔥",
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
return messages.get(mood, "New day, new chance to grow 🌅")
|
| 31 |
|
| 32 |
@tool
|
| 33 |
def get_current_time_in_timezone(timezone: str) -> str:
|