Spaces:
Sleeping
Sleeping
updated import
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
@@ -33,7 +33,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
-
image_generation_tool =
|
| 37 |
"black-forest-labs/FLUX.1-schnell",
|
| 38 |
name="image_generator",
|
| 39 |
description="Generate an image from a prompt"
|
|
|
|
| 1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool, Tool
|
| 2 |
import datetime
|
| 3 |
import requests
|
| 4 |
import pytz
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
+
image_generation_tool = Tool.from_space(
|
| 37 |
"black-forest-labs/FLUX.1-schnell",
|
| 38 |
name="image_generator",
|
| 39 |
description="Generate an image from a prompt"
|