Skip to content

Commit 67269f8

Browse files
Generate separate sections for each images in case multiple images are provided
1 parent 2ec08f7 commit 67269f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ async def process_chunk(content):
236236
await websocket.send_json(
237237
{"type": "status", "value": "Generating images..."}
238238
)
239-
# TODO: PDF response in case of pdf input. Use a flag to identify source of images.
240239
updated_html = await generate_images(
241240
completion,
242241
api_key=openai_api_key,

backend/prompts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TAILWIND_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.
55
You might also be given a screenshot(The second image) of a web page that you have already built, and asked to
66
update it to look more like the reference image(The first image).
@@ -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)