cyberandy commited on
Commit
b0e56f1
Β·
verified Β·
1 Parent(s): f41d654

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -11
app.py CHANGED
@@ -32,13 +32,35 @@ def generate_product_description(image, description_type, custom_instruction=Non
32
 
33
  # Set the description type or custom instruction
34
  description_prompts = {
35
- "Short Formal": "Create a compelling and succinct product description from the image.",
36
- "Bullet Points": "Provide a detailed product description in bullet points based on the image.",
37
- "Amazon Optimized": "Write an Amazon-style product description that includes key features, benefits, and a call to action.",
38
- "Fashion": "Generate a stylish and trendy product description suitable for a fashion item based on the image.",
39
- "Sport": "Create an energetic and engaging product description for a sports-related item based on the image.",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
 
42
  if description_type == "Other" and custom_instruction:
43
  instruction = custom_instruction
44
  else:
@@ -96,14 +118,35 @@ with gr.Blocks(css=css) as demo:
96
  description_type = gr.Dropdown(
97
  label="Select Description Type",
98
  choices=[
99
- "Short Formal",
100
- "Bullet Points",
101
- "Amazon Optimized",
102
- "Fashion",
103
- "Sport",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  "Other",
105
  ],
106
- value="Short Formal",
107
  )
108
  custom_instruction = gr.Textbox(
109
  label="Custom Instruction (Only for 'Other')", visible=False
 
32
 
33
  # Set the description type or custom instruction
34
  description_prompts = {
35
+ "Short Formal πŸ“": "Based on the image, craft a concise and compelling product description that highlights key features and benefits in a formal tone.",
36
+ "Bullet Points πŸ“‹": "From the image, provide a detailed list of bullet points describing the product's features, benefits, and unique selling points.",
37
+ "Amazon Optimized πŸ›’": "Create an Amazon-style product description based on the image, including key features, benefits, relevant keywords for SEO, and a persuasive call to action.",
38
+ "Fashion πŸ‘—": "Generate a stylish and trendy product description for a fashion item shown in the image, emphasizing its design, materials, and how it fits into current fashion trends.",
39
+ "Sport πŸ€": "Using the image, develop an energetic and engaging product description for a sports-related item, highlighting its performance features and benefits for athletic activities.",
40
+ "Technical Specifications βš™οΈ": "Extract and present the product's technical specifications from the image in a clear and concise manner, suitable for tech-savvy customers.",
41
+ "SEO Optimized πŸ”": "Write an SEO-friendly product description based on the image, incorporating relevant keywords and phrases to enhance search engine visibility.",
42
+ "Social Media Style πŸ“±": "Create a catchy and engaging product description suitable for social media platforms, using the image as inspiration.",
43
+ "Luxury πŸ’Ž": "Craft an elegant and sophisticated product description for the luxury item shown in the image, emphasizing exclusivity, premium quality, and craftsmanship.",
44
+ "Kid-Friendly 🧸": "Generate a fun and appealing product description for a children's product based on the image, using language that resonates with both kids and parents.",
45
+ "Health and Beauty πŸ’„": "Develop a compelling product description for a health or beauty item shown in the image, highlighting its benefits, ingredients, and usage tips.",
46
+ "Electronic Gadgets πŸ“±": "Write a tech-focused product description for the electronic gadget in the image, focusing on its innovative features, specifications, and user advantages.",
47
+ "Eco-Friendly 🌱": "Create an eco-conscious product description for the environmentally friendly product shown in the image, emphasizing sustainability and green benefits.",
48
+ "Personalized Gifts 🎁": "Generate a heartfelt product description for the personalized gift in the image, highlighting customization options and sentimental value.",
49
+ "Seasonal Promotion πŸŽ‰": "Craft a seasonal promotional product description based on the image, incorporating festive themes and limited-time offers to encourage immediate purchase.",
50
+ "Clearance Sale 🏷️": "Write an urgent and enticing product description for the item in the image, emphasizing discounted prices and limited stock availability.",
51
+ "Cross-Selling πŸ”—": "Develop a product description that not only highlights the item in the image but also suggests complementary products, encouraging additional purchases.",
52
+ "Up-Selling ⬆️": "Create a persuasive product description that highlights premium features of the item in the image, encouraging customers to consider higher-end versions.",
53
+ "Multi-Language Support 🌍": "Provide a product description based on the image in multiple languages to cater to a diverse customer base.",
54
+ "User Testimonials ⭐": "Incorporate fictional user testimonials or reviews into the product description based on the image, adding credibility and social proof.",
55
+ "Instructional πŸ“˜": "Write a product description that includes usage instructions or assembly steps for the item shown in the image.",
56
+ "Bundle Offer πŸ“¦": "Craft a product description that promotes the item in the image as part of a bundle deal, highlighting the added value.",
57
+ "Gift Guide Entry 🎁": "Generate a product description suitable for inclusion in a gift guide, emphasizing why the item in the image makes a great gift.",
58
+ "Limited Edition πŸš€": "Create an exclusive product description for the limited-edition item shown in the image, highlighting its uniqueness and scarcity.",
59
+ "Subscription Model πŸ”„": "Write a product description that promotes the item in the image as part of a subscription service, detailing recurring benefits.",
60
+ "B2B Focused 🏒": "Develop a professional product description suitable for business-to-business contexts, emphasizing features relevant to corporate clients.",
61
  }
62
 
63
+
64
  if description_type == "Other" and custom_instruction:
65
  instruction = custom_instruction
66
  else:
 
118
  description_type = gr.Dropdown(
119
  label="Select Description Type",
120
  choices=[
121
+ "Short Formal πŸ“",
122
+ "Bullet Points πŸ“‹",
123
+ "Amazon Optimized πŸ›’",
124
+ "Fashion πŸ‘—",
125
+ "Sport πŸ€",
126
+ "Technical Specifications βš™οΈ",
127
+ "SEO Optimized πŸ”",
128
+ "Social Media Style πŸ“±",
129
+ "Luxury πŸ’Ž",
130
+ "Kid-Friendly 🧸",
131
+ "Health and Beauty πŸ’„",
132
+ "Electronic Gadgets πŸ“±",
133
+ "Eco-Friendly 🌱",
134
+ "Personalized Gifts 🎁",
135
+ "Seasonal Promotion πŸŽ‰",
136
+ "Clearance Sale 🏷️",
137
+ "Cross-Selling πŸ”—",
138
+ "Up-Selling ⬆️",
139
+ "Multi-Language Support 🌍",
140
+ "User Testimonials ⭐",
141
+ "Instructional πŸ“˜",
142
+ "Bundle Offer πŸ“¦",
143
+ "Gift Guide Entry 🎁",
144
+ "Limited Edition πŸš€",
145
+ "Subscription Model πŸ”„",
146
+ "B2B Focused 🏒",
147
  "Other",
148
  ],
149
+ value="Short Formal πŸ“",
150
  )
151
  custom_instruction = gr.Textbox(
152
  label="Custom Instruction (Only for 'Other')", visible=False