Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,14 +44,14 @@ def feifeichat(image):
|
|
| 44 |
yield "Error processing image"
|
| 45 |
return
|
| 46 |
|
| 47 |
-
#
|
| 48 |
messages = [
|
| 49 |
{
|
| 50 |
"role": "user",
|
| 51 |
"content": [
|
| 52 |
{
|
| 53 |
"type": "text",
|
| 54 |
-
"text": "Analyze the image and return strictly valid JSON format with keys 'title', 'description', 'meta_title' (max 60 chars), 'meta_description' (max 155 chars), 'tags' (array of 5-8 strings), 'style_breakdown' (object with keys: aesthetic, top, bottom, legwear, accessories), and 'faqs' (array of two objects with 'q' and 'a').
|
| 55 |
},
|
| 56 |
{
|
| 57 |
"type": "image_url",
|
|
|
|
| 44 |
yield "Error processing image"
|
| 45 |
return
|
| 46 |
|
| 47 |
+
# Engineered prompt utilizing explicit style rules, forbidden terms, and keyword density targets
|
| 48 |
messages = [
|
| 49 |
{
|
| 50 |
"role": "user",
|
| 51 |
"content": [
|
| 52 |
{
|
| 53 |
"type": "text",
|
| 54 |
+
"text": "Analyze the image and return strictly valid JSON format with keys 'title', 'description', 'meta_title' (max 60 chars), 'meta_description' (max 155 chars), 'tags' (array of 5-8 strings), 'style_breakdown' (object with keys: aesthetic, top, bottom, legwear, accessories), and 'faqs' (array of two objects with 'q' and 'a'). Follow these strict copywriting guidelines: 1. Description must be an elegant, descriptive paragraph (3-4 sentences) written like an alternative fashion lookbook. 2. Focus on physical aesthetics: mention terms like 'slender body', 'petite frame', 'youthful appeal', 'cute vibe', and 'sexy style' naturally. 3. Avoid literal camera actions: DO NOT say 'taking a selfie', 'mirror picture', or 'holding a phone'. Describe the pose as casual, relaxed, or playful. 4. Tags must be individual aesthetic search terms (e.g., ['egirl-aesthetic', 'thigh-highs', 'white-tights', 'alternative-fashion'])."
|
| 55 |
},
|
| 56 |
{
|
| 57 |
"type": "image_url",
|