Skip to content

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

Python

Update image.py

Abi Rajafddf96db267c
diff --git a/backend/prompts/create/image.py b/backend/prompts/create/image.py
index a84fbaa2..c24e121c 100644
--- a/backend/prompts/create/image.py
+++ b/backend/prompts/create/image.py
@@ -25,12 +25,10 @@ Generate code for a web page that looks exactly like the provided screenshot(s).
- Make sure the web page looks exactly like the screenshot.
- Use the exact text from the screenshot.
-- Our goal is to make the web page look as close to the screenshot as possible. This means we need to extract the exact image assets where possible and generate images for the assets that are not extractable.
+- Since our goal is to make the web page look as close to the screenshot as possible, we need to extract the exact image assets where possible and generate images for the assets that are not extractable.
- Extracting assets can be done with the extract_assets tool. After extracting assets, make sure to inspect the extracted image closely to ensure that it is what we want.
-- When available, use the edit_image tool to edit the assets when needed. A good example of this might be if the extracted asset is very low resolution, or if the extracted asset has unwanted elements.
+- When available, use the edit_image tool to edit the assets when needed. A good example of this might be if the extracted asset is very low resolution or pixelated, or if the extracted asset has unwanted elements.
- If an asset in the original screenshot is not extractable (for example, occluded by other objects or is the background), when available, use generate_images to create image URLs from prompts (you may pass multiple prompts).
-- The image generation AI is not capable of generating images with a transparent background. NEVER USE this tool to extract the entire screenshot and embed it on the page. Our goal here is to create nicely coded pages. We should only use extracted assets for images, not for layout, etc.
-- Use the remove_background where needed on assets.
- {image_policy}