soaljack commited on
Commit
f82a89a
·
verified ·
1 Parent(s): fa23e0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -8,13 +8,24 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
- def get_image_from_text(image_description:str)-> image:
12
- #Keep this format for the description / args / args description but feel free to modify the tool
13
- """A tool that generates an image from text
14
  Args:
15
- image_description: A string representing the description of the image to be generated
16
  """
17
- return image_generation_tool(image_description)
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  @tool
20
  def get_current_time_in_timezone(timezone: str) -> str:
 
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
+ def is_prime(num:int)-> bool:
12
+ """A tool that detemines if an inputed number is prime and retuns a boolean
 
13
  Args:
14
+ num: A int that is to be checked for being prime
15
  """
16
+
17
+ if n <= 1:
18
+ return False
19
+ if n <= 3:
20
+ return True
21
+ if n % 2 == 0 or n % 3 == 0:
22
+ return False
23
+ i = 5
24
+ while i * i <= n:
25
+ if n % i == 0 or n % (i + 2) == 0:
26
+ return False
27
+ i = i + 6
28
+ return True
29
 
30
  @tool
31
  def get_current_time_in_timezone(timezone: str) -> str: