From e24ac0f9b33ecab613ef5e7bfbb64c2739b0f427 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 2 Sep 2026 14:26:20 +0530 Subject: [PATCH] feat: improve gemini prompt for intelligent handling of thin objects and text removal --- backend/server.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/server.js b/backend/server.js index 7f0694b..8bc9d7d 100644 --- a/backend/server.js +++ b/backend/server.js @@ -387,7 +387,13 @@ app.post('/api/sparkplug/generate-images', authenticate, async (req, res) => { // Run parallel generation for all 4 views const promises = views.map(async (view, index) => { - const fullPrompt = `${prompt}. ${view}, isolated on a pure white background, studio lighting.`; + const fullPrompt = `A clean, isolated product photography shot of: ${prompt}. +Focus ONLY on the product itself. +View: ${view}. +CRITICAL INSTRUCTIONS: +1. Pure white background. +2. DO NOT include any infographics, extra text, labels, icons, or background scenery. Just the isolated object. +3. If this object is very thin (like a sachet, pouch, or packet), the 'Left side view' and 'Right side view' must only show the thin edge profile of the object without the main front artwork.`; const payload = { contents: [