Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,
|
2 |
import datetime
|
3 |
import pytz
|
4 |
import yaml
|
@@ -28,7 +28,8 @@ model = HfApiModel(
|
|
28 |
custom_role_conversions=None,
|
29 |
)
|
30 |
|
31 |
-
|
|
|
32 |
|
33 |
with open("prompts.yaml", 'r') as stream:
|
34 |
prompt_templates = yaml.safe_load(stream)
|
@@ -38,7 +39,7 @@ agent = CodeAgent(
|
|
38 |
tools=[
|
39 |
final_answer,
|
40 |
DuckDuckGoSearchTool(),
|
41 |
-
image_generation_tool,
|
42 |
get_current_time_in_timezone
|
43 |
],
|
44 |
max_steps=6,
|
|
|
1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, tool
|
2 |
import datetime
|
3 |
import pytz
|
4 |
import yaml
|
|
|
28 |
custom_role_conversions=None,
|
29 |
)
|
30 |
|
31 |
+
# ----- تم تعطيل الأداة المُشككة -----
|
32 |
+
# image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
33 |
|
34 |
with open("prompts.yaml", 'r') as stream:
|
35 |
prompt_templates = yaml.safe_load(stream)
|
|
|
39 |
tools=[
|
40 |
final_answer,
|
41 |
DuckDuckGoSearchTool(),
|
42 |
+
# image_generation_tool, # <--- مُعطلة مؤقتًا
|
43 |
get_current_time_in_timezone
|
44 |
],
|
45 |
max_steps=6,
|