Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import json
|
3 |
-
from smolagents import CodeAgent,
|
|
|
4 |
|
5 |
final_answer = FinalAnswerTool()
|
6 |
model = HfApiModel(model_id='Qwen/Qwen2.5-Coder-32B-Instruct')
|
@@ -21,20 +22,20 @@ class ProjectScopingTool(Tool):
|
|
21 |
"description": "The industry or field related to the project (e.g., 'finance', 'healthcare').",
|
22 |
},
|
23 |
"budget_min": {
|
24 |
-
"type": "
|
25 |
"description": "The minimum budget allocated for the project.",
|
26 |
},
|
27 |
"budget_max": {
|
28 |
-
"type": "
|
29 |
"description": "The maximum budget allocated for the project.",
|
30 |
},
|
31 |
"timeline_months": {
|
32 |
-
"type": "
|
33 |
"description": "The expected duration of the project in months.",
|
34 |
},
|
35 |
}
|
36 |
|
37 |
-
output_type = "
|
38 |
|
39 |
def forward(self, project_type: str, domain: str, budget_min: float, budget_max: float, timeline_months: int):
|
40 |
project_details = {
|
@@ -58,7 +59,7 @@ class TechnicalArchitectureTool(Tool):
|
|
58 |
}
|
59 |
}
|
60 |
|
61 |
-
output_type = "
|
62 |
|
63 |
def forward(self, project_type: str):
|
64 |
architectures = {
|
@@ -88,16 +89,16 @@ class CostEstimationTool(Tool):
|
|
88 |
|
89 |
inputs = {
|
90 |
"architecture_size": {
|
91 |
-
"type": "
|
92 |
"description": "The estimated complexity of the architecture on a scale from 1 to 10.",
|
93 |
},
|
94 |
"timeline_months": {
|
95 |
-
"type": "
|
96 |
"description": "The project duration in months.",
|
97 |
}
|
98 |
}
|
99 |
|
100 |
-
output_type = "
|
101 |
|
102 |
def forward(self, architecture_size: int, timeline_months: int):
|
103 |
base_costs = {
|
@@ -116,7 +117,7 @@ class DeploymentTool(Tool):
|
|
116 |
|
117 |
inputs = {}
|
118 |
|
119 |
-
output_type = "
|
120 |
|
121 |
def forward(self):
|
122 |
return json.dumps({
|
@@ -139,7 +140,7 @@ class MeetingPreparationTool(Tool):
|
|
139 |
}
|
140 |
}
|
141 |
|
142 |
-
output_type = "
|
143 |
|
144 |
def forward(self, project_stage: str):
|
145 |
agendas = {
|
|
|
1 |
import gradio as gr
|
2 |
import json
|
3 |
+
from smolagents import CodeAgent,
|
4 |
+
tool, Tool, FinalAnswerTool, HfApiModel, load_tool
|
5 |
|
6 |
final_answer = FinalAnswerTool()
|
7 |
model = HfApiModel(model_id='Qwen/Qwen2.5-Coder-32B-Instruct')
|
|
|
22 |
"description": "The industry or field related to the project (e.g., 'finance', 'healthcare').",
|
23 |
},
|
24 |
"budget_min": {
|
25 |
+
"type": "number",
|
26 |
"description": "The minimum budget allocated for the project.",
|
27 |
},
|
28 |
"budget_max": {
|
29 |
+
"type": "number",
|
30 |
"description": "The maximum budget allocated for the project.",
|
31 |
},
|
32 |
"timeline_months": {
|
33 |
+
"type": "number",
|
34 |
"description": "The expected duration of the project in months.",
|
35 |
},
|
36 |
}
|
37 |
|
38 |
+
output_type = "object"
|
39 |
|
40 |
def forward(self, project_type: str, domain: str, budget_min: float, budget_max: float, timeline_months: int):
|
41 |
project_details = {
|
|
|
59 |
}
|
60 |
}
|
61 |
|
62 |
+
output_type = "object"
|
63 |
|
64 |
def forward(self, project_type: str):
|
65 |
architectures = {
|
|
|
89 |
|
90 |
inputs = {
|
91 |
"architecture_size": {
|
92 |
+
"type": "number",
|
93 |
"description": "The estimated complexity of the architecture on a scale from 1 to 10.",
|
94 |
},
|
95 |
"timeline_months": {
|
96 |
+
"type": "number",
|
97 |
"description": "The project duration in months.",
|
98 |
}
|
99 |
}
|
100 |
|
101 |
+
output_type = "object"
|
102 |
|
103 |
def forward(self, architecture_size: int, timeline_months: int):
|
104 |
base_costs = {
|
|
|
117 |
|
118 |
inputs = {}
|
119 |
|
120 |
+
output_type = "object"
|
121 |
|
122 |
def forward(self):
|
123 |
return json.dumps({
|
|
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
output_type = "object"
|
144 |
|
145 |
def forward(self, project_stage: str):
|
146 |
agendas = {
|