Spaces:
Sleeping
Sleeping
app.py
CHANGED
|
@@ -34,12 +34,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 36 |
|
| 37 |
-
image_generation_tool = Tool.from_space(
|
| 38 |
-
"black-forest-labs/FLUX.1-schnell",
|
| 39 |
-
name="image_generator",
|
| 40 |
-
description="Generate an image from a prompt"
|
| 41 |
-
)
|
| 42 |
-
|
| 43 |
search_web = DuckDuckGoSearchTool()
|
| 44 |
visit_page = VisitWebpageTool()
|
| 45 |
final_answer = FinalAnswerTool()
|
|
@@ -56,7 +50,7 @@ custom_role_conversions=None,
|
|
| 56 |
|
| 57 |
|
| 58 |
# Import tool from Hub
|
| 59 |
-
|
| 60 |
|
| 61 |
with open("prompts.yaml", 'r') as stream:
|
| 62 |
prompt_templates = yaml.safe_load(stream)
|
|
|
|
| 34 |
except Exception as e:
|
| 35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
search_web = DuckDuckGoSearchTool()
|
| 38 |
visit_page = VisitWebpageTool()
|
| 39 |
final_answer = FinalAnswerTool()
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
# Import tool from Hub
|
| 53 |
+
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 54 |
|
| 55 |
with open("prompts.yaml", 'r') as stream:
|
| 56 |
prompt_templates = yaml.safe_load(stream)
|