Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Clarify multi-screenshot prompt

Abi Raja85776c6e7ee3
diff --git a/backend/prompts/__init__.py b/backend/prompts/__init__.py
index 2fb085f5..d9286690 100644
--- a/backend/prompts/__init__.py
+++ b/backend/prompts/__init__.py
@@ -10,11 +10,12 @@ from prompts.types import Stack, PromptContent
USER_PROMPT = """
-Generate code for a web page that looks exactly like this.
+Generate code for a web page that looks exactly like the provided screenshot(s).
+If multiple screenshots are provided, treat them as different screens in the same app.
"""
SVG_USER_PROMPT = """
-Generate code for a SVG that looks exactly like this.
+Generate code for a SVG that looks exactly like the provided screenshot(s).
"""
diff --git a/backend/tests/test_prompts.py b/backend/tests/test_prompts.py
index ea385164..1b70a874 100644
--- a/backend/tests/test_prompts.py
+++ b/backend/tests/test_prompts.py
@@ -122,7 +122,7 @@ class TestCreatePrompt:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
@@ -182,7 +182,7 @@ class TestCreatePrompt:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
@@ -402,7 +402,7 @@ class TestCreatePrompt:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
@@ -479,7 +479,7 @@ class TestCreatePrompt:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
@@ -561,7 +561,7 @@ class TestCreatePrompt:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
diff --git a/backend/tests/test_prompts_additional.py b/backend/tests/test_prompts_additional.py
index b9e9da85..d17af147 100644
--- a/backend/tests/test_prompts_additional.py
+++ b/backend/tests/test_prompts_additional.py
@@ -129,7 +129,7 @@ class TestCreatePromptImageSupport:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},
@@ -211,7 +211,7 @@ class TestCreatePromptImageSupport:
},
{
"type": "text",
- "text": "<CONTAINS:Generate code for a web page that looks exactly like this.>",
+ "text": "<CONTAINS:Generate code for a web page that looks exactly like the provided screenshot(s).>",
},
],
},