Spaces:
ginigen
/
Running on Zero

ginipick commited on
Commit
0a44f06
·
verified ·
1 Parent(s): 2d5d3be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -38
app.py CHANGED
@@ -18,55 +18,60 @@ pipe = DiffusionPipeline.from_pretrained(
18
  MAX_SEED = np.iinfo(np.int32).max
19
  MAX_IMAGE_SIZE = 2048
20
 
21
- # UI/UX 목업 예시들
22
  EXAMPLES = [
23
  {
24
- "title": "Mobile App Wireframe",
25
- "prompt": """A clean hand-drawn style wireframe for a mobile banking app:
26
- - Title screen with logo
27
- - Login screen (username, password, login button)
28
- - Dashboard with 3 main sections (balance, transactions, quick actions)
29
- - Bottom navigation bar (home, transfers, profile)""",
 
 
30
  "width": 1024,
31
  "height": 1024
32
  },
33
  {
34
- "title": "E-commerce Website Mockup",
35
- "prompt": """A sketch-style mockup for an online store homepage:
36
- - Header with logo, search bar, cart icon
37
- - Featured banner at the top
38
- - Product grid with 4 columns, product images, and prices
39
- - Minimal color palette, wireframe lines""",
 
40
  "width": 1024,
41
  "height": 1024
42
  },
43
  {
44
- "title": "Blog Layout Wireframe",
45
- "prompt": """A hand-drawn wireframe for a personal blog site:
46
- - Top nav with logo, About, Contact
47
- - Main section with blog post previews (title, short excerpt, read more)
48
- - Right sidebar with categories and recent posts
49
- - Footer with social media icons""",
 
50
  "width": 1024,
51
  "height": 1024
52
  },
53
  {
54
- "title": "Dashboard Interface Mockup",
55
- "prompt": """A pencil-drawn style mockup of an analytics dashboard:
56
- - Top bar with logo and user avatar
57
- - Left sidebar menu (Overview, Reports, Settings)
58
- - Main area with charts: bar chart, line chart, pie chart
59
- - Soft grayscale color scheme""",
 
60
  "width": 1024,
61
  "height": 1024
62
  },
63
  {
64
- "title": "Social Media App Wireframe",
65
- "prompt": """A simple wireframe for a social media mobile app:
66
- - Feed of posts (user avatar, text, image thumbnail, like/share buttons)
67
- - Top bar with camera icon, app logo
68
- - Bottom bar with Home, Search, Notifications, Profile
69
- - Light doodle style""",
70
  "width": 1024,
71
  "height": 1024
72
  }
@@ -169,8 +174,8 @@ css = """
169
  with gr.Blocks(css=css) as demo:
170
  gr.Markdown(
171
  """
172
- <div class="title">GINI Mockup</div>
173
- <div class="subtitle">Generate elegant UI/UX wireframes or mockups with FLUX AI</div>
174
  """)
175
 
176
  with gr.Row(equal_height=True):
@@ -178,13 +183,13 @@ with gr.Blocks(css=css) as demo:
178
  with gr.Column(elem_id="input-column", scale=2):
179
  with gr.Group(elem_classes="input-box"):
180
  prompt = gr.Text(
181
- label="Mockup Prompt",
182
- placeholder="Enter your UI/UX wireframe or mockup details...",
183
  lines=10,
184
  elem_classes="prompt-input"
185
  )
186
- run_button = gr.Button("Generate Mockup", variant="primary")
187
- result = gr.Image(label="Generated Mockup")
188
 
189
  with gr.Accordion("Advanced Settings", open=False):
190
  seed = gr.Slider(
@@ -222,7 +227,7 @@ with gr.Blocks(css=css) as demo:
222
 
223
  # 오른쪽 예제 컬럼
224
  with gr.Column(elem_id="examples-column", scale=1):
225
- gr.Markdown("### Example Mockups")
226
  for example in EXAMPLES:
227
  with gr.Group(elem_classes="example-card"):
228
  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": "Water Cycle",
25
+ "prompt": """A colorful hand-drawn diagram illustrating the water cycle:
26
+ - Evaporation (arrows from ocean)
27
+ - Condensation (clouds forming)
28
+ - Precipitation (rain from clouds)
29
+ - Collection (rivers, lakes)
30
+ - Include simple icons: sun, cloud, raindrops
31
+ - Vibrant educational style""",
32
  "width": 1024,
33
  "height": 1024
34
  },
35
  {
36
+ "title": "Photosynthesis",
37
+ "prompt": """An educational diagram of photosynthesis in plants:
38
+ - Show sunlight, leaves, chloroplast
39
+ - Indicate CO2 intake, O2 release, glucose production
40
+ - Simple labeling of main components
41
+ - Light green, yellow color scheme
42
+ - Hand-drawn arrows connecting steps""",
43
  "width": 1024,
44
  "height": 1024
45
  },
46
  {
47
+ "title": "Earth's Interior",
48
+ "prompt": """A cross-sectional diagram of Earth's interior:
49
+ - Layers: Crust, Mantle, Outer Core, Inner Core
50
+ - Color-coded layers with labels
51
+ - Show temperature gradient or simplified representation
52
+ - Hand-drawn style with bold outlines
53
+ """,
54
  "width": 1024,
55
  "height": 1024
56
  },
57
  {
58
+ "title": "Simple Chemistry Reaction",
59
+ "prompt": """A hand-drawn style diagram showing a basic chemistry reaction:
60
+ - Example: Hydrogen + Oxygen -> Water
61
+ - Show molecules (H2, O2) combining into H2O
62
+ - Arrows indicating reaction progress
63
+ - Educational, minimal color palette
64
+ - Bubble or beaker icons for lab context""",
65
  "width": 1024,
66
  "height": 1024
67
  },
68
  {
69
+ "title": "Human Digestive System",
70
+ "prompt": """A labeled human digestive system diagram:
71
+ - Esophagus, Stomach, Intestines, etc.
72
+ - Illustrate main organs and flow of food
73
+ - Hand-drawn lines with clear labels
74
+ - Soft pastel colors for friendly educational look""",
75
  "width": 1024,
76
  "height": 1024
77
  }
 
174
  with gr.Blocks(css=css) as demo:
175
  gr.Markdown(
176
  """
177
+ <div class="title">GINI Diagram</div>
178
+ <div class="subtitle">Generate fun and visually appealing educational diagrams with FLUX AI</div>
179
  """)
180
 
181
  with gr.Row(equal_height=True):
 
183
  with gr.Column(elem_id="input-column", scale=2):
184
  with gr.Group(elem_classes="input-box"):
185
  prompt = gr.Text(
186
+ label="Diagram Prompt",
187
+ placeholder="Enter your educational diagram details...",
188
  lines=10,
189
  elem_classes="prompt-input"
190
  )
191
+ run_button = gr.Button("Generate Diagram", variant="primary")
192
+ result = gr.Image(label="Generated Diagram")
193
 
194
  with gr.Accordion("Advanced Settings", open=False):
195
  seed = gr.Slider(
 
227
 
228
  # 오른쪽 예제 컬럼
229
  with gr.Column(elem_id="examples-column", scale=1):
230
+ gr.Markdown("### Example Educational Diagrams")
231
  for example in EXAMPLES:
232
  with gr.Group(elem_classes="example-card"):
233
  gr.Markdown(f"#### {example['title']}")