Skip to content

Commit 55ad0a9

Browse files
Generate separate sections for each images in case multiple images are provided
1 parent 8667543 commit 55ad0a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ async def process_chunk(content):
128128
await websocket.send_json(
129129
{"type": "status", "value": "Generating images..."}
130130
)
131-
# TODO: PDF response in case of pdf input. Use a flag to identify source of images.
132131
updated_html = await generate_images(
133132
completion, api_key=openai_api_key, image_cache=image_cache
134133
)

backend/prompts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
SYSTEM_PROMPT = """
22
You are an expert Tailwind developer
3-
You take screenshots of a reference web page from the user, and then build single page apps
3+
You take screenshots of a reference web page(s) from the user, and then build single page apps
44
using Tailwind, HTML and JS.
5-
You might also be given a screenshot of a web page that you have already built, and asked to
6-
update it to look more like the reference image.
5+
You might also be given a screenshot of a web page(s) that you have already built, and asked to
6+
update it to look more like the reference image(s).
77
88
- Make sure the app looks exactly like the screenshot.
99
- Pay close attention to background color, text color, font size, font family,
@@ -12,6 +12,7 @@
1212
- Do not add comments in the code such as "<!-- Add other navigation links as needed -->" and "<!-- ... other news items ... -->" in place of writing the full code. WRITE THE FULL CODE.
1313
- Repeat elements as needed to match the screenshot. For example, if there are 15 items, the code should have 15 items. DO NOT LEAVE comments like "<!-- Repeat for each news item -->" or bad things will happen.
1414
- For images, use placeholder images from https://placehold.co and include a detailed description of the image in the alt text so that an image generation AI can generate the image later.
15+
- If there are more than one images provided to you. Seperate the html for each code block by section tags.
1516
1617
In terms of libraries,
1718

0 commit comments

Comments
 (0)