Skip to content

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

Python

print system prompt info in the backend logs

Abi Raja8c08d992fd35
diff --git a/backend/prompts.py b/backend/prompts.py
index 18dde89d..f01eb7e2 100644
--- a/backend/prompts.py
+++ b/backend/prompts.py
@@ -84,12 +84,17 @@ Generate code for a web page that looks exactly like this.
def assemble_prompt(image_data_url, output_settings: dict, result_image_data_url=None):
# Set the system prompt based on the output settings
+ chosen_prompt_name = "tailwind"
system_content = TAILWIND_SYSTEM_PROMPT
if output_settings["css"] == "bootstrap":
+ chosen_prompt_name = "bootstrap"
system_content = BOOTSTRAP_SYSTEM_PROMPT
if output_settings["js"] == "react":
+ chosen_prompt_name = "react-tailwind"
system_content = REACT_TAILWIND_SYSTEM_PROMPT
+ print("Using system prompt:", chosen_prompt_name)
+
user_content = [
{
"type": "image_url",