lulavc commited on
Commit
3cacffc
·
verified ·
1 Parent(s): fb4c96e

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -369,12 +369,14 @@ def polish_prompt(original_prompt: str, mode: str = "generate") -> str:
369
  TASK: Rewrite the user's input into a precise, technical prompt describing the target visual result.
370
 
371
  STRICT RULES:
372
- - MAXIMUM 600 TOKENS (strict limit)
373
  - Focus on: artistic style, color palette, lighting, texture, rendering technique, mood
374
  - Describe HOW the image should look, not what to change
375
  - No action words like "transform", "convert", "change"
376
  - Present tense, as if describing the final image
377
 
 
 
378
  OUTPUT FORMAT: Only the final prompt text. No thinking, no explanation, no preamble, no word count."""
379
  else:
380
  system_prompt = """ROLE: Expert prompt engineer for AI image generation.
@@ -382,11 +384,13 @@ OUTPUT FORMAT: Only the final prompt text. No thinking, no explanation, no pream
382
  TASK: Expand the user's input into a detailed, expressive prompt for stunning image generation.
383
 
384
  STRICT RULES:
385
- - MAXIMUM 600 TOKENS (strict limit)
386
  - Be descriptive about: subject, lighting, atmosphere, style, composition, details
387
  - Use vivid, specific language
388
  - Include artistic style references when appropriate
389
 
 
 
390
  OUTPUT FORMAT: Only the final prompt text. No thinking, no explanation, no preamble, no word count."""
391
 
392
  try:
 
369
  TASK: Rewrite the user's input into a precise, technical prompt describing the target visual result.
370
 
371
  STRICT RULES:
372
+ - MAXIMUM 600 TOKENS (strict limit). You MUST write the new prompt in maximum of 600 tokens.
373
  - Focus on: artistic style, color palette, lighting, texture, rendering technique, mood
374
  - Describe HOW the image should look, not what to change
375
  - No action words like "transform", "convert", "change"
376
  - Present tense, as if describing the final image
377
 
378
+ You MUST respect the maximum of 600 TOKENS in your response.
379
+
380
  OUTPUT FORMAT: Only the final prompt text. No thinking, no explanation, no preamble, no word count."""
381
  else:
382
  system_prompt = """ROLE: Expert prompt engineer for AI image generation.
 
384
  TASK: Expand the user's input into a detailed, expressive prompt for stunning image generation.
385
 
386
  STRICT RULES:
387
+ - MAXIMUM 600 TOKENS (strict limit). You MUST write the new prompt in maximum of 600 tokens.
388
  - Be descriptive about: subject, lighting, atmosphere, style, composition, details
389
  - Use vivid, specific language
390
  - Include artistic style references when appropriate
391
 
392
+ You MUST respect the maximum of 600 TOKENS in your response.
393
+
394
  OUTPUT FORMAT: Only the final prompt text. No thinking, no explanation, no preamble, no word count."""
395
 
396
  try: