Update constants.py
Browse files- constants.py +22 -1
constants.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import os
|
| 2 |
import re
|
| 3 |
from http import HTTPStatus
|
| 4 |
from typing import Dict, List, Optional, Tuple
|
|
@@ -52,3 +52,24 @@ Always output only the HTML code inside a ```html ... ``` code block, and do not
|
|
| 52 |
|
| 53 |
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.
|
| 54 |
IMPORTANT: You MUST output ALL THREE files in the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
import re
|
| 3 |
from http import HTTPStatus
|
| 4 |
from typing import Dict, List, Optional, Tuple
|
|
|
|
| 52 |
|
| 53 |
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.
|
| 54 |
IMPORTANT: You MUST output ALL THREE files in the following format:
|
| 55 |
+
```html
|
| 56 |
+
<!-- index.html content here -->
|
| 57 |
+
```
|
| 58 |
+
```javascript
|
| 59 |
+
// index.js content here
|
| 60 |
+
```
|
| 61 |
+
```css
|
| 62 |
+
/* style.css content here */
|
| 63 |
+
```
|
| 64 |
+
Requirements:
|
| 65 |
+
1. Create a modern, responsive web application using transformers.js
|
| 66 |
+
2. Use the transformers.js library for AI/ML functionality
|
| 67 |
+
3. Create a clean, professional UI with good user experience
|
| 68 |
+
4. Make the application fully responsive for mobile devices
|
| 69 |
+
5. Use modern CSS practices and JavaScript ES6+ features
|
| 70 |
+
6. Include proper error handling and loading states
|
| 71 |
+
7. Follow accessibility best practices
|
| 72 |
+
The index.html should contain the basic HTML structure and link to the CSS and JS files.
|
| 73 |
+
The index.js should contain all the JavaScript logic including transformers.js integration.
|
| 74 |
+
The style.css should contain all the styling for the application.
|
| 75 |
+
Always output only the three code blocks as shown above, and do not include any explanations or extra text."""
|