jamesbright commited on
Commit
78fb7b6
·
verified ·
1 Parent(s): 37f93a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -1,5 +1,10 @@
1
  import gradio as gr
2
  import json
 
 
 
 
 
3
 
4
  class ProjectScopingTool:
5
  """
@@ -56,8 +61,7 @@ class CostEstimationTool:
56
  """
57
  def estimate_project_cost(self, architecture_size, timeline_months):
58
  base_costs = {
59
- "development": 5000 * (architecture_size *
60
- 0.5),
61
  "infrastructure": 500 * (architecture_size * 0.3),
62
  "maintenance": 1000 * (architecture_size * 0.2)
63
  }
@@ -102,6 +106,17 @@ cost_tool = CostEstimationTool()
102
  deploy_tool = DeploymentTool()
103
  meeting_tool = MeetingPreparationTool()
104
 
 
 
 
 
 
 
 
 
 
 
 
105
  # Define Gradio Interface
106
  with gr.Blocks() as demo:
107
  gr.Markdown("# 🏗️ Project Scoping & Cost Estimation Tool")
@@ -134,4 +149,4 @@ with gr.Blocks() as demo:
134
  outputs=[project_output, arch_output, cost_output, deploy_output, meeting_output])
135
 
136
  # Launch the Gradio App
137
- demo.launch(share=True)
 
1
  import gradio as gr
2
  import json
3
+ from smolagents import CodeAgent
4
+ from smolagents.models import HfApiModel
5
+
6
+ # Initialize the model
7
+ model = HfApiModel(model_id="Qwen/Qwen2.5-72B-Instruct")
8
 
9
  class ProjectScopingTool:
10
  """
 
61
  """
62
  def estimate_project_cost(self, architecture_size, timeline_months):
63
  base_costs = {
64
+ "development": 5000 * (architecture_size * 0.5),
 
65
  "infrastructure": 500 * (architecture_size * 0.3),
66
  "maintenance": 1000 * (architecture_size * 0.2)
67
  }
 
106
  deploy_tool = DeploymentTool()
107
  meeting_tool = MeetingPreparationTool()
108
 
109
+ # Define the agent
110
+ tools = [
111
+ scoping_tool.collect_project_details,
112
+ tech_arch_tool.generate_architecture,
113
+ cost_tool.estimate_project_cost,
114
+ deploy_tool.generate_deployment_strategy,
115
+ meeting_tool.generate_meeting_agenda
116
+ ]
117
+
118
+ agent = CodeAgent(tools=tools, model=model)
119
+
120
  # Define Gradio Interface
121
  with gr.Blocks() as demo:
122
  gr.Markdown("# 🏗️ Project Scoping & Cost Estimation Tool")
 
149
  outputs=[project_output, arch_output, cost_output, deploy_output, meeting_output])
150
 
151
  # Launch the Gradio App
152
+ demo.launch()