Download core/workflow/solution.py from Johntang386/MathematicalModelingAgent: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/spaces/Johntang386/MathematicalModelingAgent/resolve/main/core/workflow/solution.py
- Command line
-
hf download hf://spaces/Johntang386/MathematicalModelingAgent/core/workflow/solution.py
-
curl -L -o solution.py https://huggingface.co/spaces/Johntang386/MathematicalModelingAgent/resolve/main/core/workflow/solution.py
404 Bytes
| from prompt.constants import TASK_PROMPT | |
| class Workflow: | |
| def __init__(self): | |
| self.agents = [] | |
| def add_agent(self, agent): | |
| self.agents.append(agent) | |
| def execute_workflow(self, task_description: str): | |
| prompt = TASK_PROMPT.format(task_description=task_description) | |
| for agent in self.agents: | |
| agent.receive_prompt(prompt) | |
| agent.execute() | |