Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import requests
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
|
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
@@ -18,6 +19,51 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
18 |
"""
|
19 |
return "What magic will you build ?"
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
@tool
|
22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
23 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
4 |
import pytz
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
+
import random
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
|
|
19 |
"""
|
20 |
return "What magic will you build ?"
|
21 |
|
22 |
+
|
23 |
+
@tool
|
24 |
+
def ai_fortune_teller(category: str) -> str:
|
25 |
+
"""Predicts the future with extreme sarcasm and humor.
|
26 |
+
|
27 |
+
Args:
|
28 |
+
category: The category to predict ('career', 'love', 'finance').
|
29 |
+
|
30 |
+
Returns:
|
31 |
+
str: A sarcastic and funny prediction.
|
32 |
+
"""
|
33 |
+
fortunes = {
|
34 |
+
'career': [
|
35 |
+
"Your dream job? Oh, you mean winning the lottery and never working again? Keep dreaming. 😂",
|
36 |
+
"You're destined for greatness... if scrolling social media for 5 hours a day counts as a skill.",
|
37 |
+
"One day, you will lead a company. That company may just be your own failed startup, but hey, leadership is leadership. 👏",
|
38 |
+
"Your boss will finally appreciate you! Just kidding. They’ll steal your ideas and take all the credit. Classic. 🤡",
|
39 |
+
"A new job opportunity is coming your way. Too bad it requires 15 years of experience for an entry-level position. 🤦♂️"
|
40 |
+
],
|
41 |
+
'love': [
|
42 |
+
"What is love? I was hoping you’d tell me. Go ask your mom, she might know. 😂",
|
43 |
+
"You will meet the love of your life... and they will promptly ghost you after three messages. 💔",
|
44 |
+
"A grand romantic gesture is in your future! Unfortunately, it’s from someone you find incredibly annoying. 🤷",
|
45 |
+
"Your soulmate is out there... probably swiping left on your profile as we speak. 😬",
|
46 |
+
"True love is coming. It might just be your delivery guy, but hey, a connection is a connection. 🚀"
|
47 |
+
],
|
48 |
+
'finance': [
|
49 |
+
"Your financial future is bright! Unless, of course, you continue buying overpriced coffee every day. ☕💸",
|
50 |
+
"You will soon receive a large sum of money. Oh wait, I misread. You will soon receive a large sum of bills. Oops. 🤡",
|
51 |
+
"Invest in crypto! Or don’t. Either way, you’ll still be confused about how it actually works. 🧐",
|
52 |
+
"You are about to make a life-changing financial decision... by finally unsubscribing from that gym membership you never use. 👏",
|
53 |
+
"A golden financial opportunity is coming. Unfortunately, it’s an MLM pitch from your cousin. 🚩"
|
54 |
+
]
|
55 |
+
}
|
56 |
+
|
57 |
+
if category in fortunes:
|
58 |
+
return random.choice(fortunes[category])
|
59 |
+
else:
|
60 |
+
return "Oh, you want a special prediction? Sure. I predict you’ll ignore this advice and continue making questionable life choices. 😂"
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
@tool
|
68 |
def get_current_time_in_timezone(timezone: str) -> str:
|
69 |
"""A tool that fetches the current local time in a specified timezone.
|