Spaces:
Runtime error
Runtime error
Extending authorized imports
Browse files
app.py
CHANGED
@@ -45,11 +45,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
47 |
model = HfApiModel(
|
48 |
-
max_tokens=2096,
|
49 |
-
temperature=0.5,
|
50 |
-
#model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
|
51 |
-
model_id="https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud",
|
52 |
-
custom_role_conversions=None,
|
53 |
)
|
54 |
|
55 |
|
@@ -63,6 +63,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
63 |
agent = CodeAgent(
|
64 |
model=model,
|
65 |
tools=[final_answer, simplify_expression, image_generation_tool],
|
|
|
66 |
max_steps=6,
|
67 |
verbosity_level=1,
|
68 |
grammar=None,
|
|
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
47 |
model = HfApiModel(
|
48 |
+
max_tokens=2096,
|
49 |
+
temperature=0.5,
|
50 |
+
#model_id='https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud',# it is possible that this model may be overloaded
|
51 |
+
model_id="https://jc26mwg228mkj8dw.us-east-1.aws.endpoints.huggingface.cloud",
|
52 |
+
custom_role_conversions=None,
|
53 |
)
|
54 |
|
55 |
|
|
|
63 |
agent = CodeAgent(
|
64 |
model=model,
|
65 |
tools=[final_answer, simplify_expression, image_generation_tool],
|
66 |
+
additional_authorized_imports=['requests', 'sympy'])
|
67 |
max_steps=6,
|
68 |
verbosity_level=1,
|
69 |
grammar=None,
|