Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,6 +30,20 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 30 |
# query = f'"{topic}" OR "{topic} review" OR "latest research on {topic}" site:scholar.google.com'
|
| 31 |
# return query
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
@tool
|
| 35 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 30 |
# query = f'"{topic}" OR "{topic} review" OR "latest research on {topic}" site:scholar.google.com'
|
| 31 |
# return query
|
| 32 |
|
| 33 |
+
@tool
|
| 34 |
+
def generate_tshirt_image(word: str, style: str) -> str:
|
| 35 |
+
"""Generates an image of a plain white T-shirt with the given word printed in a specified style.
|
| 36 |
+
|
| 37 |
+
Args:
|
| 38 |
+
word: The word to be displayed on the T-shirt.
|
| 39 |
+
style: The text style or color (e.g., 'bold black', 'red cursive', 'blue graffiti').
|
| 40 |
+
|
| 41 |
+
Returns:
|
| 42 |
+
A URL or image file of the generated T-shirt.
|
| 43 |
+
"""
|
| 44 |
+
prompt = f"A plain white T-shirt with the word '{word}' printed in {style} font on the front."
|
| 45 |
+
image = image_generation_tool(prompt)
|
| 46 |
+
return image
|
| 47 |
|
| 48 |
@tool
|
| 49 |
def get_current_time_in_timezone(timezone: str) -> str:
|