Update app.py
Browse files
app.py
CHANGED
|
@@ -18,60 +18,55 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 18 |
MAX_SEED = np.iinfo(np.int32).max
|
| 19 |
MAX_IMAGE_SIZE = 2048
|
| 20 |
|
| 21 |
-
#
|
| 22 |
EXAMPLES = [
|
| 23 |
{
|
| 24 |
-
"title": "
|
| 25 |
-
"prompt": """A
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
-
|
| 29 |
-
-
|
| 30 |
-
- Include simple icons: sun, cloud, raindrops
|
| 31 |
-
- Vibrant educational style""",
|
| 32 |
"width": 1024,
|
| 33 |
"height": 1024
|
| 34 |
},
|
| 35 |
{
|
| 36 |
-
"title": "
|
| 37 |
-
"prompt": """
|
| 38 |
-
-
|
| 39 |
-
-
|
| 40 |
-
-
|
| 41 |
-
-
|
| 42 |
-
- Hand-drawn arrows connecting steps""",
|
| 43 |
"width": 1024,
|
| 44 |
"height": 1024
|
| 45 |
},
|
| 46 |
{
|
| 47 |
-
"title": "
|
| 48 |
-
"prompt": """A
|
| 49 |
-
-
|
| 50 |
-
-
|
| 51 |
-
-
|
| 52 |
-
-
|
| 53 |
-
""",
|
| 54 |
"width": 1024,
|
| 55 |
"height": 1024
|
| 56 |
},
|
| 57 |
{
|
| 58 |
-
"title": "
|
| 59 |
-
"prompt": """
|
| 60 |
-
-
|
| 61 |
-
-
|
| 62 |
-
-
|
| 63 |
-
-
|
| 64 |
-
- Bubble or beaker icons for lab context""",
|
| 65 |
"width": 1024,
|
| 66 |
"height": 1024
|
| 67 |
},
|
| 68 |
{
|
| 69 |
-
"title": "
|
| 70 |
-
"prompt": """A
|
| 71 |
-
-
|
| 72 |
-
-
|
| 73 |
-
-
|
| 74 |
-
- Soft
|
| 75 |
"width": 1024,
|
| 76 |
"height": 1024
|
| 77 |
}
|
|
@@ -174,8 +169,8 @@ css = """
|
|
| 174 |
with gr.Blocks(css=css) as demo:
|
| 175 |
gr.Markdown(
|
| 176 |
"""
|
| 177 |
-
<div class="title">GINI
|
| 178 |
-
<div class="subtitle">Generate
|
| 179 |
""")
|
| 180 |
|
| 181 |
with gr.Row(equal_height=True):
|
|
@@ -183,13 +178,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 183 |
with gr.Column(elem_id="input-column", scale=2):
|
| 184 |
with gr.Group(elem_classes="input-box"):
|
| 185 |
prompt = gr.Text(
|
| 186 |
-
label="
|
| 187 |
-
placeholder="Enter your
|
| 188 |
lines=10,
|
| 189 |
elem_classes="prompt-input"
|
| 190 |
)
|
| 191 |
-
run_button = gr.Button("Generate
|
| 192 |
-
result = gr.Image(label="Generated
|
| 193 |
|
| 194 |
with gr.Accordion("Advanced Settings", open=False):
|
| 195 |
seed = gr.Slider(
|
|
@@ -227,7 +222,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 227 |
|
| 228 |
# 오른쪽 예제 컬럼
|
| 229 |
with gr.Column(elem_id="examples-column", scale=1):
|
| 230 |
-
gr.Markdown("### Example
|
| 231 |
for example in EXAMPLES:
|
| 232 |
with gr.Group(elem_classes="example-card"):
|
| 233 |
gr.Markdown(f"#### {example['title']}")
|
|
|
|
| 18 |
MAX_SEED = np.iinfo(np.int32).max
|
| 19 |
MAX_IMAGE_SIZE = 2048
|
| 20 |
|
| 21 |
+
# 제품 디자인 컨셉 예시
|
| 22 |
EXAMPLES = [
|
| 23 |
{
|
| 24 |
+
"title": "Smart Coffee Machine",
|
| 25 |
+
"prompt": """A sleek industrial design concept for a coffee machine:
|
| 26 |
+
- Curved metallic body with minimal bezel
|
| 27 |
+
- Touchscreen panel for settings
|
| 28 |
+
- Modern matte black finish
|
| 29 |
+
- Hand-drawn concept sketch style""",
|
|
|
|
|
|
|
| 30 |
"width": 1024,
|
| 31 |
"height": 1024
|
| 32 |
},
|
| 33 |
{
|
| 34 |
+
"title": "AI Speaker",
|
| 35 |
+
"prompt": """A futuristic AI speaker concept:
|
| 36 |
+
- Cylindrical shape with LED ring near top
|
| 37 |
+
- Voice assistant concept, floating panel controls
|
| 38 |
+
- Smooth glossy finish with minimal seams
|
| 39 |
+
- Techy, modern look in grayscale""",
|
|
|
|
| 40 |
"width": 1024,
|
| 41 |
"height": 1024
|
| 42 |
},
|
| 43 |
{
|
| 44 |
+
"title": "Next-Gen Smartphone",
|
| 45 |
+
"prompt": """A wireframe-style concept for a bezel-less smartphone:
|
| 46 |
+
- Edge-to-edge display
|
| 47 |
+
- Integrated camera under screen
|
| 48 |
+
- Metallic frame, minimal ports
|
| 49 |
+
- Sleek, glossy black design""",
|
|
|
|
| 50 |
"width": 1024,
|
| 51 |
"height": 1024
|
| 52 |
},
|
| 53 |
{
|
| 54 |
+
"title": "Futuristic Electric Bicycle",
|
| 55 |
+
"prompt": """An industrial design sketch of an electric bike:
|
| 56 |
+
- Lightweight carbon frame, aerodynamic lines
|
| 57 |
+
- Integrated battery, sleek display on handlebars
|
| 58 |
+
- Neon color highlights on wheels
|
| 59 |
+
- High-tech vibe, minimal clutter""",
|
|
|
|
| 60 |
"width": 1024,
|
| 61 |
"height": 1024
|
| 62 |
},
|
| 63 |
{
|
| 64 |
+
"title": "Concept Car Interior",
|
| 65 |
+
"prompt": """A luxurious and futuristic car interior concept:
|
| 66 |
+
- Wrap-around digital dashboard
|
| 67 |
+
- Minimalistic steering control, seat controls on touchscreen
|
| 68 |
+
- Ambient LED accent lights
|
| 69 |
+
- Soft leather seats, bright accent stitching""",
|
| 70 |
"width": 1024,
|
| 71 |
"height": 1024
|
| 72 |
}
|
|
|
|
| 169 |
with gr.Blocks(css=css) as demo:
|
| 170 |
gr.Markdown(
|
| 171 |
"""
|
| 172 |
+
<div class="title">GINI Design</div>
|
| 173 |
+
<div class="subtitle">Generate sleek industrial/product design concepts with FLUX AI</div>
|
| 174 |
""")
|
| 175 |
|
| 176 |
with gr.Row(equal_height=True):
|
|
|
|
| 178 |
with gr.Column(elem_id="input-column", scale=2):
|
| 179 |
with gr.Group(elem_classes="input-box"):
|
| 180 |
prompt = gr.Text(
|
| 181 |
+
label="Design Prompt",
|
| 182 |
+
placeholder="Enter your product design concept details...",
|
| 183 |
lines=10,
|
| 184 |
elem_classes="prompt-input"
|
| 185 |
)
|
| 186 |
+
run_button = gr.Button("Generate Design", variant="primary")
|
| 187 |
+
result = gr.Image(label="Generated Design")
|
| 188 |
|
| 189 |
with gr.Accordion("Advanced Settings", open=False):
|
| 190 |
seed = gr.Slider(
|
|
|
|
| 222 |
|
| 223 |
# 오른쪽 예제 컬럼
|
| 224 |
with gr.Column(elem_id="examples-column", scale=1):
|
| 225 |
+
gr.Markdown("### Example Product Designs")
|
| 226 |
for example in EXAMPLES:
|
| 227 |
with gr.Group(elem_classes="example-card"):
|
| 228 |
gr.Markdown(f"#### {example['title']}")
|