zerovic commited on
Commit
39b31a6
·
verified ·
1 Parent(s): 865fbdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -44,14 +44,14 @@ def feifeichat(image):
44
  yield "Error processing image"
45
  return
46
 
47
- # Groq requires a different format for image messages
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'), focusing on youthfulness, cute/sexy style, and legwear, with no code blocks or intro text."
55
  },
56
  {
57
  "type": "image_url",
@@ -63,7 +63,6 @@ def feifeichat(image):
63
  }
64
  ]
65
 
66
- # response_format forcing JSON mode guarantees error-free data structural rendering
67
  response = client.chat.completions.create(
68
  model="meta-llama/llama-4-scout-17b-16e-instruct",
69
  messages=messages,
 
44
  yield "Error processing image"
45
  return
46
 
47
+ # Expanded prompt explicitly pushing for narrative depth, key phrasing, and aesthetic richness
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'). The language must be creative, highly descriptive, and stylish. Focus heavily on body details (slender, petite, curvy), specific age tones (teen, young adult), and descriptive vocabulary (sexy, cute, alluring, trendy, aesthetic) woven naturally into fluent paragraphs. Ensure titles are catchy, click-worthy lookbook headlines."
55
  },
56
  {
57
  "type": "image_url",
 
63
  }
64
  ]
65
 
 
66
  response = client.chat.completions.create(
67
  model="meta-llama/llama-4-scout-17b-16e-instruct",
68
  messages=messages,