Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,13 +8,24 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
@tool
|
| 11 |
-
def
|
| 12 |
-
|
| 13 |
-
"""A tool that generates an image from text
|
| 14 |
Args:
|
| 15 |
-
|
| 16 |
"""
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|