atejandro commited on
Commit
dbccfd2
·
verified ·
1 Parent(s): 2f2d905

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
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
@@ -51,7 +51,13 @@ custom_role_conversions=None,
51
 
52
 
53
  # Import tool from Hub
54
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
 
 
 
 
55
 
56
  with open("prompts.yaml", 'r') as stream:
57
  prompt_templates = yaml.safe_load(stream)
 
1
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool, Tool
2
  import datetime
3
  import requests
4
  import pytz
 
51
 
52
 
53
  # Import tool from Hub
54
+ image_generation_tool_2 = load_tool("agents-course/text-to-image", trust_remote_code=True)
55
+
56
+ image_generation_tool = Tool.from_space(
57
+ "black-forest-labs/FLUX.1-schnell",
58
+ name="image_generator",
59
+ description="Generate an image from a prompt"
60
+ )
61
 
62
  with open("prompts.yaml", 'r') as stream:
63
  prompt_templates = yaml.safe_load(stream)