Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
-
from tools.JavaScriptToPythonConverter import JavaScriptMethodDispatcher
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
@@ -80,7 +80,7 @@ def get_current_time_in_timezone(timezone: str, timeformat: str) -> str:
|
|
| 80 |
|
| 81 |
final_answer = FinalAnswerTool()
|
| 82 |
|
| 83 |
-
jsCallable = JavaScriptMethodDispatcher()
|
| 84 |
|
| 85 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 86 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
@@ -101,7 +101,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 101 |
|
| 102 |
agent = CodeAgent(
|
| 103 |
model=model,
|
| 104 |
-
tools=[final_answer, jsCallable], ## add your tools here (don't remove final answer)
|
| 105 |
max_steps=6,
|
| 106 |
verbosity_level=1,
|
| 107 |
grammar=None,
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
+
#from tools.JavaScriptToPythonConverter import JavaScriptMethodDispatcher
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
|
|
|
| 80 |
|
| 81 |
final_answer = FinalAnswerTool()
|
| 82 |
|
| 83 |
+
#jsCallable = JavaScriptMethodDispatcher()
|
| 84 |
|
| 85 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 86 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
|
| 101 |
|
| 102 |
agent = CodeAgent(
|
| 103 |
model=model,
|
| 104 |
+
tools=[final_answer], #, jsCallable], ## add your tools here (don't remove final answer)
|
| 105 |
max_steps=6,
|
| 106 |
verbosity_level=1,
|
| 107 |
grammar=None,
|