Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ from smolagents.models
|
|
| 5 |
import HfApiModel
|
| 6 |
|
| 7 |
# Initialize the model
|
| 8 |
-
model = HfApiModel(model_id="Qwen/Qwen2.5-
|
| 9 |
|
| 10 |
-
|
| 11 |
-
class ProjectScopingTool:
|
| 12 |
"""
|
| 13 |
Handles project scoping by collecting key details such as type, domain, budget, and timeline.
|
| 14 |
"""
|
|
@@ -33,8 +33,8 @@ class ProjectScopingTool:
|
|
| 33 |
}
|
| 34 |
return json.dumps(self.project_details, indent=2)
|
| 35 |
|
| 36 |
-
|
| 37 |
-
class TechnicalArchitectureTool:
|
| 38 |
"""
|
| 39 |
Determines the appropriate technical architecture based on the project type.
|
| 40 |
"""
|
|
@@ -58,8 +58,8 @@ class TechnicalArchitectureTool:
|
|
| 58 |
}
|
| 59 |
return json.dumps(architectures.get(project_type, "Invalid project type"), indent=2)
|
| 60 |
|
| 61 |
-
|
| 62 |
-
class CostEstimationTool:
|
| 63 |
"""
|
| 64 |
Estimates the cost based on the architecture complexity and timeline.
|
| 65 |
"""
|
|
@@ -72,8 +72,8 @@ class CostEstimationTool:
|
|
| 72 |
total_cost = sum(base_costs.values())
|
| 73 |
return json.dumps({"total_estimated_cost": total_cost, "breakdown": base_costs}, indent=2)
|
| 74 |
|
| 75 |
-
|
| 76 |
-
class DeploymentTool:
|
| 77 |
"""
|
| 78 |
Suggests a deployment strategy based on best practices.
|
| 79 |
"""
|
|
@@ -85,8 +85,8 @@ class DeploymentTool:
|
|
| 85 |
"ci_cd_pipeline": "GitHub Actions"
|
| 86 |
}, indent=2)
|
| 87 |
|
| 88 |
-
|
| 89 |
-
class MeetingPreparationTool:
|
| 90 |
"""
|
| 91 |
Provides meeting agendas depending on the project stage.
|
| 92 |
"""
|
|
@@ -155,4 +155,4 @@ with gr.Blocks() as demo:
|
|
| 155 |
outputs=[project_output, arch_output, cost_output, deploy_output, meeting_output])
|
| 156 |
|
| 157 |
# Launch the Gradio App
|
| 158 |
-
demo.launch()
|
|
|
|
| 5 |
import HfApiModel
|
| 6 |
|
| 7 |
# Initialize the model
|
| 8 |
+
model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 9 |
|
| 10 |
+
|
| 11 |
+
class ProjectScopingTool(Tool):
|
| 12 |
"""
|
| 13 |
Handles project scoping by collecting key details such as type, domain, budget, and timeline.
|
| 14 |
"""
|
|
|
|
| 33 |
}
|
| 34 |
return json.dumps(self.project_details, indent=2)
|
| 35 |
|
| 36 |
+
|
| 37 |
+
class TechnicalArchitectureTool(Tool):
|
| 38 |
"""
|
| 39 |
Determines the appropriate technical architecture based on the project type.
|
| 40 |
"""
|
|
|
|
| 58 |
}
|
| 59 |
return json.dumps(architectures.get(project_type, "Invalid project type"), indent=2)
|
| 60 |
|
| 61 |
+
|
| 62 |
+
class CostEstimationTool(Tool):
|
| 63 |
"""
|
| 64 |
Estimates the cost based on the architecture complexity and timeline.
|
| 65 |
"""
|
|
|
|
| 72 |
total_cost = sum(base_costs.values())
|
| 73 |
return json.dumps({"total_estimated_cost": total_cost, "breakdown": base_costs}, indent=2)
|
| 74 |
|
| 75 |
+
|
| 76 |
+
class DeploymentTool(Tool):
|
| 77 |
"""
|
| 78 |
Suggests a deployment strategy based on best practices.
|
| 79 |
"""
|
|
|
|
| 85 |
"ci_cd_pipeline": "GitHub Actions"
|
| 86 |
}, indent=2)
|
| 87 |
|
| 88 |
+
|
| 89 |
+
class MeetingPreparationTool(Tool):
|
| 90 |
"""
|
| 91 |
Provides meeting agendas depending on the project stage.
|
| 92 |
"""
|
|
|
|
| 155 |
outputs=[project_output, arch_output, cost_output, deploy_output, meeting_output])
|
| 156 |
|
| 157 |
# Launch the Gradio App
|
| 158 |
+
demo(agent).launch()
|