Spaces:
Runtime error
Runtime error
lionelgarnier
commited on
Commit
·
67b0366
1
Parent(s):
a196f30
update default system prompt to English and simplify examples format
Browse files
app.py
CHANGED
@@ -18,13 +18,13 @@ MAX_IMAGE_SIZE = 2048
|
|
18 |
PRELOAD_MODELS = False
|
19 |
|
20 |
# Default system prompt for text generation
|
21 |
-
DEFAULT_SYSTEM_PROMPT = """
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
# Default Flux parameters
|
30 |
DEFAULT_SEED = 42
|
@@ -172,9 +172,9 @@ def infer(prompt, seed=DEFAULT_SEED,
|
|
172 |
|
173 |
# Format: [prompt, system_prompt]
|
174 |
examples = [
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
]
|
179 |
|
180 |
css="""
|
@@ -292,7 +292,7 @@ def create_interface():
|
|
292 |
gr.Examples(
|
293 |
examples=examples, # Now just a list of prompts
|
294 |
fn=process_example_pipeline,
|
295 |
-
inputs=[prompt
|
296 |
outputs=[prompt, refined_prompt, error_box], # Don't output image
|
297 |
cache_examples=True,
|
298 |
)
|
|
|
18 |
PRELOAD_MODELS = False
|
19 |
|
20 |
# Default system prompt for text generation
|
21 |
+
DEFAULT_SYSTEM_PROMPT = """You are a product designer with strong knowledge in text-to-image generation. You will receive a product request in the form of a brief description, and your mission will be to imagine a new product design that meets this need.
|
22 |
|
23 |
+
The deliverable (generated response) will be exclusively a text prompt for the FLUX.1-schnell text-to-image AI.
|
24 |
|
25 |
+
This prompt should include a visual description of the object explicitly mentioning the essential aspects of its function.
|
26 |
+
Additionally, you should explicitly mention in this prompt the aesthetic/photo characteristics of the image rendering (e.g., photorealistic, high quality, focal length, grain, etc.), knowing that the image will be the main image of this object in the product catalog. The background of the generated image must be entirely white.
|
27 |
+
The prompt should be without narration, can be long but must not exceed 77 tokens."""
|
28 |
|
29 |
# Default Flux parameters
|
30 |
DEFAULT_SEED = 42
|
|
|
172 |
|
173 |
# Format: [prompt, system_prompt]
|
174 |
examples = [
|
175 |
+
"a backpack for kids, flower style",
|
176 |
+
"medieval flip flops",
|
177 |
+
"cat shaped cake mold",
|
178 |
]
|
179 |
|
180 |
css="""
|
|
|
292 |
gr.Examples(
|
293 |
examples=examples, # Now just a list of prompts
|
294 |
fn=process_example_pipeline,
|
295 |
+
inputs=[prompt], # Add system_prompt as input
|
296 |
outputs=[prompt, refined_prompt, error_box], # Don't output image
|
297 |
cache_examples=True,
|
298 |
)
|