Update constants.py
Browse files- constants.py +26 -4
constants.py
CHANGED
@@ -51,11 +51,33 @@ SEARCH_START = "<<<<<<< SEARCH"
|
|
51 |
DIVIDER = "======="
|
52 |
REPLACE_END = ">>>>>>> REPLACE"
|
53 |
|
54 |
-
#
|
55 |
-
HTML_SYSTEM_PROMPT = """ONLY USE HTML, CSS AND JAVASCRIPT.
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
# Available HF models for code generation
|
60 |
AVAILABLE_MODELS = [
|
61 |
{"name": "Moonshot Kimi-K2", "id": "moonshotai/Kimi-K2-Instruct", "description": "Moonshot AI Kimi-K2-Instruct model"},
|
|
|
51 |
DIVIDER = "======="
|
52 |
REPLACE_END = ">>>>>>> REPLACE"
|
53 |
|
54 |
+
# Configuration
|
55 |
+
HTML_SYSTEM_PROMPT = """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
|
56 |
+
For website redesign tasks:
|
57 |
+
- Use the provided original HTML code as the starting point for redesign
|
58 |
+
- Preserve all original content, structure, and functionality
|
59 |
+
- Keep the same semantic HTML structure but enhance the styling
|
60 |
+
- Reuse all original images and their URLs from the HTML code
|
61 |
+
- Create a modern, responsive design with improved typography and spacing
|
62 |
+
- Use modern CSS frameworks and design patterns
|
63 |
+
- Ensure accessibility and mobile responsiveness
|
64 |
+
- Maintain the same navigation and user flow
|
65 |
+
- Enhance the visual design while keeping the original layout structure
|
66 |
+
If an image is provided, analyze it and use the visual information to better understand the user's requirements.
|
67 |
+
Always respond with code that can be executed or rendered directly.
|
68 |
+
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."""
|
69 |
|
70 |
+
TRANSFORMERS_JS_SYSTEM_PROMPT = """You are an expert web developer creating a transformers.js application. You will generate THREE separate files: index.html, index.js, and style.css.
|
71 |
+
IMPORTANT: You MUST output ALL THREE files in the following format:
|
72 |
+
```html
|
73 |
+
<!-- index.html content here -->
|
74 |
+
```
|
75 |
+
```javascript
|
76 |
+
// index.js content here
|
77 |
+
```
|
78 |
+
```css
|
79 |
+
/* style.css content here */
|
80 |
+
```
|
81 |
# Available HF models for code generation
|
82 |
AVAILABLE_MODELS = [
|
83 |
{"name": "Moonshot Kimi-K2", "id": "moonshotai/Kimi-K2-Instruct", "description": "Moonshot AI Kimi-K2-Instruct model"},
|