spandana30 commited on
Commit
d5dae56
·
verified ·
1 Parent(s): cb20fd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -26
app.py CHANGED
@@ -91,47 +91,48 @@ def agent(template: str, state: AgentState, agent_key: str, timing_label: str):
91
 
92
  PROMPTS = {
93
  "product_manager": (
94
- "You're a Product Manager. Interpret this user request:\\n"
95
- "{user_request}\\n"
96
  "Define the high-level product goals, features, and user stories."
97
  ),
98
  "project_manager": (
99
- "You're a Project Manager. Based on this feature list:\\n"
100
- "{product_vision}\\n"
101
  "Create a project plan with key milestones and task assignments."
102
  ),
103
  "designer": (
104
- "You're a UI designer. Create design specs for:\\n"
105
- "{project_plan}\\n"
106
- "Include:\\n"
107
- "1. Color palette (primary, secondary, accent)\\n"
108
- "2. Font choices\\n"
109
- "3. Layout structure\\n"
110
- "4. Component styles\\n"
111
  "Don't write code - just design guidance."
112
  ),
113
  "software_engineer": (
114
- "Create a complete HTML page with embedded CSS for:\\n"
115
- "{design_specs}\\n"
116
- "Requirements:\\n"
117
- "1. Full HTML document with <!DOCTYPE>\\n"
118
- "2. CSS inside <style> tags in head\\n"
119
- "3. Mobile-responsive\\n"
120
- "4. Semantic HTML\\n"
121
- "5. Ready-to-use (will work when saved as .html)\\n"
122
  "Output JUST the complete HTML file content:"
123
  ),
124
  "qa_engineer": (
125
- "Review this website:\\n"
126
- "{html}\\n"
127
- "Check for:\\n"
128
- "1. Visual quality\\n"
129
- "2. Responsiveness\\n"
130
- "3. Functionality\\n"
131
- "Reply "APPROVED" if perfect, or suggest improvements."
132
  )
133
  }
134
 
 
135
  def generate_ui(user_prompt: str, max_iter: int):
136
  state: AgentState = {
137
  "messages": [{"role": "user", "content": user_prompt}],
 
91
 
92
  PROMPTS = {
93
  "product_manager": (
94
+ "You're a Product Manager. Interpret this user request:\n"
95
+ "{user_request}\n"
96
  "Define the high-level product goals, features, and user stories."
97
  ),
98
  "project_manager": (
99
+ "You're a Project Manager. Based on this feature list:\n"
100
+ "{product_vision}\n"
101
  "Create a project plan with key milestones and task assignments."
102
  ),
103
  "designer": (
104
+ "You're a UI designer. Create design specs for:\n"
105
+ "{project_plan}\n"
106
+ "Include:\n"
107
+ "1. Color palette (primary, secondary, accent)\n"
108
+ "2. Font choices\n"
109
+ "3. Layout structure\n"
110
+ "4. Component styles\n"
111
  "Don't write code - just design guidance."
112
  ),
113
  "software_engineer": (
114
+ "Create a complete HTML page with embedded CSS for:\n"
115
+ "{design_specs}\n"
116
+ "Requirements:\n"
117
+ "1. Full HTML document with <!DOCTYPE>\n"
118
+ "2. CSS inside <style> tags in head\n"
119
+ "3. Mobile-responsive\n"
120
+ "4. Semantic HTML\n"
121
+ "5. Ready-to-use (will work when saved as .html)\n"
122
  "Output JUST the complete HTML file content:"
123
  ),
124
  "qa_engineer": (
125
+ "Review this website:\n"
126
+ "{html}\n"
127
+ "Check for:\n"
128
+ "1. Visual quality\n"
129
+ "2. Responsiveness\n"
130
+ "3. Functionality\n"
131
+ "Reply \"APPROVED\" if perfect, or suggest improvements."
132
  )
133
  }
134
 
135
+
136
  def generate_ui(user_prompt: str, max_iter: int):
137
  state: AgentState = {
138
  "messages": [{"role": "user", "content": user_prompt}],