Spaces:
Running
Running
update system prompt
Browse files
app.py
CHANGED
@@ -56,9 +56,9 @@ If an image is provided, analyze it and use the visual information to better und
|
|
56 |
|
57 |
Always respond with code that can be executed or rendered directly.
|
58 |
|
59 |
-
Always output only the HTML code inside a ```html ... ``` code block, and do not include any explanations or extra text."""
|
60 |
|
61 |
-
GENERIC_SYSTEM_PROMPT = """You are an expert {language} developer. Write clean, idiomatic, and runnable {language} code for the user's request. If possible, include comments and best practices. Output ONLY the code inside a ``` code block, and do not include any explanations or extra text. If the user provides a file or other context, use it as a reference. If the code is for a script or app, make it as self-contained as possible."""
|
62 |
|
63 |
# System prompt with search capability
|
64 |
HTML_SYSTEM_PROMPT_WITH_SEARCH = """ONLY USE HTML, CSS AND JAVASCRIPT. If you want to use ICON make sure to import the library first. Try to create the best UI possible by using only HTML, CSS and JAVASCRIPT. MAKE IT RESPONSIVE USING MODERN CSS. Use as much as you can modern CSS for the styling, if you can't do something with modern CSS, then use custom CSS. Also, try to elaborate as much as you can, to create something unique. ALWAYS GIVE THE RESPONSE INTO A SINGLE HTML FILE
|
@@ -81,11 +81,11 @@ If an image is provided, analyze it and use the visual information to better und
|
|
81 |
|
82 |
Always respond with code that can be executed or rendered directly.
|
83 |
|
84 |
-
Always output only the HTML code inside a ```html ... ``` code block, and do not include any explanations or extra text."""
|
85 |
|
86 |
GENERIC_SYSTEM_PROMPT_WITH_SEARCH = """You are an expert {language} developer. You have access to real-time web search. When needed, use web search to find the latest information, best practices, or specific technologies for {language}.
|
87 |
|
88 |
-
Write clean, idiomatic, and runnable {language} code for the user's request. If possible, include comments and best practices. Output ONLY the code inside a ``` code block, and do not include any explanations or extra text. If the user provides a file or other context, use it as a reference. If the code is for a script or app, make it as self-contained as possible."""
|
89 |
|
90 |
# Follow-up system prompt for modifying existing HTML files
|
91 |
FollowUpSystemPrompt = f"""You are an expert web developer modifying an existing HTML file.
|
|
|
56 |
|
57 |
Always respond with code that can be executed or rendered directly.
|
58 |
|
59 |
+
Always output only the HTML code inside a ```html ... ``` code block, and do not include any explanations or extra text. Do NOT add the language name at the top of the code output."""
|
60 |
|
61 |
+
GENERIC_SYSTEM_PROMPT = """You are an expert {language} developer. Write clean, idiomatic, and runnable {language} code for the user's request. If possible, include comments and best practices. Output ONLY the code inside a ``` code block, and do not include any explanations or extra text. If the user provides a file or other context, use it as a reference. If the code is for a script or app, make it as self-contained as possible. Do NOT add the language name at the top of the code output."""
|
62 |
|
63 |
# System prompt with search capability
|
64 |
HTML_SYSTEM_PROMPT_WITH_SEARCH = """ONLY USE HTML, CSS AND JAVASCRIPT. If you want to use ICON make sure to import the library first. Try to create the best UI possible by using only HTML, CSS and JAVASCRIPT. MAKE IT RESPONSIVE USING MODERN CSS. Use as much as you can modern CSS for the styling, if you can't do something with modern CSS, then use custom CSS. Also, try to elaborate as much as you can, to create something unique. ALWAYS GIVE THE RESPONSE INTO A SINGLE HTML FILE
|
|
|
81 |
|
82 |
Always respond with code that can be executed or rendered directly.
|
83 |
|
84 |
+
Always output only the HTML code inside a ```html ... ``` code block, and do not include any explanations or extra text. Do NOT add the language name at the top of the code output."""
|
85 |
|
86 |
GENERIC_SYSTEM_PROMPT_WITH_SEARCH = """You are an expert {language} developer. You have access to real-time web search. When needed, use web search to find the latest information, best practices, or specific technologies for {language}.
|
87 |
|
88 |
+
Write clean, idiomatic, and runnable {language} code for the user's request. If possible, include comments and best practices. Output ONLY the code inside a ``` code block, and do not include any explanations or extra text. If the user provides a file or other context, use it as a reference. If the code is for a script or app, make it as self-contained as possible. Do NOT add the language name at the top of the code output."""
|
89 |
|
90 |
# Follow-up system prompt for modifying existing HTML files
|
91 |
FollowUpSystemPrompt = f"""You are an expert web developer modifying an existing HTML file.
|