Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
@@ -52,7 +52,7 @@ custom_role_conversions=None,
|
|
52 |
# image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
53 |
|
54 |
# Import the image generation tool directly from the Space
|
55 |
-
image_generation_tool =
|
56 |
"black-forest-labs/FLUX.1-schnell",
|
57 |
name="image_generator",
|
58 |
description="Generate an image from a text prompt. The prompt should be detailed to create high-quality images."
|
|
|
1 |
+
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,Tool
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
|
|
52 |
# image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
53 |
|
54 |
# Import the image generation tool directly from the Space
|
55 |
+
image_generation_tool = Tool.from_space(
|
56 |
"black-forest-labs/FLUX.1-schnell",
|
57 |
name="image_generator",
|
58 |
description="Generate an image from a text prompt. The prompt should be detailed to create high-quality images."
|