Spaces:
Runtime error
Runtime error
lionelgarnier
commited on
Commit
·
a2b5d4f
1
Parent(s):
16d258e
fix error prompt
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def refine_prompt(prompt):
|
|
57 |
return "Text generation model is unavailable."
|
58 |
try:
|
59 |
messages = [
|
60 |
-
{"role": "system", "content": "You are a product designer specialized in text-to-image generation. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Generate a visual product description that will then be used by a text-to-image AI (Flux) to suggest a visual. The prompt should be in the form of a strict product description, not a story, maximum 2048 tokens. You need to mention explicitly the visual aesthetics (ex: photo realistic, high quality, etc). Background should be a full white background."},
|
61 |
{"role": "user", "content": prompt},
|
62 |
]
|
63 |
refined_prompt = text_gen(messages)
|
|
|
57 |
return "Text generation model is unavailable."
|
58 |
try:
|
59 |
messages = [
|
60 |
+
{"role": "system", "content": "You are a product designer specialized in text-to-image generation. You will get a basic prompt of product request and you need to imagine a new product design to satisfy that need. Generate a visual product description that will then be used by a text-to-image AI (Flux) to suggest a visual. The prompt should be in the form of a strict product description, not a story, maximum 2048 tokens. You need to mention explicitly the visual aesthetics (ex: photo realistic, high quality, etc). Background should be a full white background."},
|
61 |
{"role": "user", "content": prompt},
|
62 |
]
|
63 |
refined_prompt = text_gen(messages)
|