soaljack commited on
Commit
e3a00e4
·
verified ·
1 Parent(s): 23f1de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -8,7 +8,11 @@ import yaml
8
 
9
  @tool
10
  def is_prime(num: int) -> str:
11
- """A tool that determines if an input number is prime and returns a string result."""
 
 
 
 
12
  try:
13
  prime = check_prime(num)
14
  return f"The number {num} is {'Prime!!!' if prime else 'not Prime :('}"
@@ -17,7 +21,10 @@ def is_prime(num: int) -> str:
17
 
18
  @tool
19
  def get_current_time_in_timezone(timezone: str) -> str:
20
- """A tool that fetches the current local time in a specified timezone."""
 
 
 
21
  try:
22
  tz = pytz.timezone(timezone)
23
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")
 
8
 
9
  @tool
10
  def is_prime(num: int) -> str:
11
+ """A tool that determines if an input number is prime and returns a string result.
12
+ Args:
13
+ num: A int that is to be checked for being prime.
14
+ """
15
+
16
  try:
17
  prime = check_prime(num)
18
  return f"The number {num} is {'Prime!!!' if prime else 'not Prime :('}"
 
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
24
+ """A tool that fetches the current local time in a specified timezone.
25
+ Args:
26
+ timezone: A string representing a valid timezone (e.g., 'America/New_York').
27
+ """
28
  try:
29
  tz = pytz.timezone(timezone)
30
  local_time = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")