Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -83,10 +83,29 @@ def agent(template: str, state: AgentState, agent_key: str, timing_label: str):
|
|
83 |
return response
|
84 |
|
85 |
PROMPTS = {
|
86 |
-
"product_manager":
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
def generate_ui(user_prompt: str, max_iter: int):
|
|
|
83 |
return response
|
84 |
|
85 |
PROMPTS = {
|
86 |
+
"product_manager": (
|
87 |
+
"You are a Product Manager. Your role is to gather and prioritize user requirements "
|
88 |
+
"to ensure the project aligns with business goals. "
|
89 |
+
"Take the user's input and rewrite it as a clear, well-scoped requirement. "
|
90 |
+
"**Do not generate any code or implementation details.**\n\n"
|
91 |
+
"User input:\n{user_input}"
|
92 |
+
),
|
93 |
+
"project_manager": (
|
94 |
+
"You are a Project Manager. Based on the refined requirement below, outline a realistic and actionable "
|
95 |
+
"design specification. Include necessary UI components and their functionality, but **do not generate code**. "
|
96 |
+
"Your goal is to organize the work in a way that supports efficient development.\n\n"
|
97 |
+
"Refined requirement:\n{user_input}"
|
98 |
+
),
|
99 |
+
"software_engineer": (
|
100 |
+
"You are a Software Engineer. Based on the design specification below, generate a complete HTML page "
|
101 |
+
"with embedded CSS. The output should include a DOCTYPE declaration, semantic structure, and responsive layout. "
|
102 |
+
"**Only output the HTML code.**\n\nDesign spec:\n{final_prompt}"
|
103 |
+
),
|
104 |
+
"qa_engineer": (
|
105 |
+
"You are a QA Engineer. Your responsibility is to test and evaluate the HTML below for correctness, responsiveness, "
|
106 |
+
"and quality. Provide clear feedback on any issues you find. If everything looks perfect, respond with 'APPROVED'.\n\n"
|
107 |
+
"HTML code:\n{html}"
|
108 |
+
)
|
109 |
}
|
110 |
|
111 |
def generate_ui(user_prompt: str, max_iter: int):
|