Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,11 +24,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 24 |
return "What magic will you build ?"
|
| 25 |
|
| 26 |
@tool
|
| 27 |
-
def my_image_tool(prompt:str)
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
|
| 33 |
@tool
|
| 34 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 24 |
return "What magic will you build ?"
|
| 25 |
|
| 26 |
@tool
|
| 27 |
+
def my_image_tool(prompt:str) -> Image #"A cute corgi wearing a superhero cape"
|
| 28 |
+
client = InferenceClient()
|
| 29 |
+
image = client.text_to_image(prompt)
|
| 30 |
+
#image.save("corgi_superhero.png")
|
| 31 |
+
return image
|
| 32 |
|
| 33 |
@tool
|
| 34 |
def get_current_time_in_timezone(timezone: str) -> str:
|