sascow commited on
Commit
f3ce546
·
verified ·
1 Parent(s): c562a43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -6
app.py CHANGED
@@ -9,14 +9,46 @@ 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(current_time:str, president_name:str)-> str: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
- """A tool that gives the meaning of life
 
 
15
  Args:
16
- current_time: the current time
17
- president_name: the name of the current president of the USA
 
 
 
18
  """
19
- return f"42 : {president_name} - {current_time}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 future_retro_inspiration(topic: str, vibe: str) -> str:
13
+ """
14
+ A tool that mashes up Gen X nostalgia with future-facing musings to provide
15
+ a one-of-a-kind motivational nudge.
16
+
17
  Args:
18
+ topic: The subject you’d like a fresh perspective on (e.g., "teamwork," "innovation").
19
+ vibe: The overall mood or style of the response (e.g., "optimistic," "no-nonsense").
20
+
21
+ Returns:
22
+ A string that fuses throwback references with forward-looking advice on the given topic.
23
  """
24
+ # We’ll keep it simple but throw in a dash of 80s flavor and futuristic insight.
25
+
26
+ retro_quotes = [
27
+ "Crank up that boombox and tune out the haters!",
28
+ "Keep on truckin’—just remember to pack your laser gun for the future.",
29
+ "We built skyscrapers to touch the sky; now we’ve got to prep for Mars!"
30
+ ]
31
+
32
+ vibe_twist = {
33
+ "optimistic": "You’ve got the power to make it happen—like a Walkman jam on full blast!",
34
+ "no-nonsense": "All right, pal, enough daydreaming—let’s push forward, no excuses!",
35
+ "bold": "No guts, no glory! Hammer pants optional, results mandatory.",
36
+ "chill": "Relax, keep it cool—like a John Hughes teen who knows it’ll all work out."
37
+ }
38
+
39
+ # Pick a random retro quote:
40
+ import random
41
+ chosen_quote = random.choice(retro_quotes)
42
+
43
+ # Get the vibe snippet or a default if vibe not found.
44
+ vibe_snippet = vibe_twist.get(vibe.lower(), "Stay rad and step forward—there’s no time like now.")
45
+
46
+ # Combine them into a single zinger.
47
+ return (
48
+ f"Topic: {topic}\n"
49
+ f"{chosen_quote} {vibe_snippet}\n"
50
+ "Forward-thinking tip: Keep an eye on emerging AI and tech trends—they’re the new frontier."
51
+ )
52
 
53
  @tool
54
  def get_current_time_in_timezone(timezone: str) -> str: