Spaces:
Sleeping
Sleeping
Update my_custom_tool() function in app.py
Browse files
app.py
CHANGED
@@ -9,14 +9,25 @@ from Gradio_UI import GradioUI
|
|
9 |
|
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:
|
13 |
-
|
14 |
-
"""A tool that does nothing yet
|
15 |
Args:
|
16 |
-
arg1:
|
17 |
-
arg2:
|
18 |
"""
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
@tool
|
22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
9 |
|
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:
|
13 |
+
"""ChronoOraculum – A sci-fi fortune device that deciphers timelines
|
|
|
14 |
Args:
|
15 |
+
arg1: your galactic designation (e.g., "Captain Nova" or "XJ-42")
|
16 |
+
arg2: your dimension frequency code (any number you fancy)
|
17 |
"""
|
18 |
+
fortunes = [
|
19 |
+
"{}: Your clone on Earth-{} just unlocked level 10 telepathy. Prepare for echo thoughts.".format(arg1, arg2),
|
20 |
+
"The AI council has reviewed your case, {}. They’ve approved your upgrade—emotion chip v7.0.".format(arg1),
|
21 |
+
"A wormhole near Jupiter-{} is pulsing in your rhythm. Coincidence? Unlikely.".format(arg2),
|
22 |
+
"{}: Your future self says to avoid time jumps before breakfast.".format(arg1),
|
23 |
+
"Interdimensional squirrels are hoarding your lost data files. Offer them pixelberries to negotiate.",
|
24 |
+
"{}: You will be elected Supreme Architect of the Nebula Network. Say yes to glitter capes.".format(arg1),
|
25 |
+
"You’ve unknowingly triggered Protocol {}. Galactic fortune favors the bold.".format(arg2),
|
26 |
+
"{}: Your spaceship’s toaster gains sentience tomorrow. Be nice to it.".format(arg1)
|
27 |
+
]
|
28 |
+
|
29 |
+
import random
|
30 |
+
return random.choice(fortunes)
|
31 |
|
32 |
@tool
|
33 |
def get_current_time_in_timezone(timezone: str) -> str:
|