fantos commited on
Commit
2cb92de
โ€ข
1 Parent(s): d32c1fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +85 -57
app.py CHANGED
@@ -256,67 +256,95 @@ function stopAllAudio() {
256
  currentlyPlaying = null;
257
  }
258
  """
 
259
 
260
- # ๊ณ ๊ธ‰ ์˜ต์…˜ ๋ถ€๋ถ„์„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •
261
- with gr.Accordion("๐ŸŽจ Advanced Options", open=False, elem_classes="accordion box-common"):
262
- with gr.Group(elem_classes="parameter-box"):
263
- gr.Markdown("### ๐ŸŽ›๏ธ Generation Parameters")
264
- with gr.Row():
265
- with gr.Column():
266
- cfg_scale = gr.Slider(
267
- label="CFG Scale",
268
- minimum=1,
269
- maximum=20,
270
- step=0.5,
271
- value=example_cfg_scale
272
- )
273
- steps = gr.Slider(
274
- label="Steps",
275
- minimum=1,
276
- maximum=100,
277
- step=1,
278
- value=example_steps
279
- )
280
- lora_scale = gr.Slider(
281
- label="LoRA Scale",
282
- minimum=0,
283
- maximum=1,
284
- step=0.01,
285
- value=example_lora_scale
286
- )
287
-
288
- with gr.Group(elem_classes="parameter-box"):
289
- gr.Markdown("### ๐Ÿ“ Image Dimensions")
290
- with gr.Row():
291
- width = gr.Slider(
292
- label="Width",
293
- minimum=256,
294
- maximum=1536,
295
- step=64,
296
- value=example_width
297
- )
298
- height = gr.Slider(
299
- label="Height",
300
- minimum=256,
301
- maximum=1536,
302
- step=64,
303
- value=example_height
304
- )
305
 
306
- with gr.Group(elem_classes="parameter-box"):
307
- gr.Markdown("### ๐ŸŽฒ Seed Settings")
308
- with gr.Row():
309
- randomize_seed = gr.Checkbox(
310
- True,
311
- label="Randomize seed"
 
 
 
 
 
 
 
 
312
  )
313
- seed = gr.Slider(
314
- label="Seed",
315
- minimum=0,
316
- maximum=MAX_SEED,
317
- step=1,
318
- value=example_seed
319
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
 
321
  # ์˜ค๋””์˜ค ์ปจํŠธ๋กค
322
  gr.HTML(f"""
 
256
  currentlyPlaying = null;
257
  }
258
  """
259
+ [์ด์ „ ์ฝ”๋“œ๋Š” ๋™์ผ...]
260
 
261
+ # Gradio ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌ์„ฑ
262
+ app = gr.Blocks(css=custom_css)
263
+
264
+ with app:
265
+ # JavaScript ์ดˆ๊ธฐํ™”
266
+ gr.HTML(f"<script>{snow_js}</script>")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
 
268
+ with gr.Column(elem_classes="container"):
269
+ gr.Markdown("# ๐ŸŽ„ X-MAS LoRA", elem_classes="header")
270
+
271
+ # ์ด๋ฏธ์ง€ ์ถœ๋ ฅ ์˜์—ญ
272
+ with gr.Group(elem_classes="result-box box-common"):
273
+ gr.Markdown("### ๐Ÿ–ผ๏ธ Generated Image")
274
+ result = gr.Image(label="Result", elem_classes="image-output")
275
+
276
+ # ํ”„๋กฌํ”„ํŠธ ์ž…๋ ฅ ์˜์—ญ
277
+ with gr.Group(elem_classes="prompt-box box-common"):
278
+ prompt = gr.TextArea(
279
+ label="โœ๏ธ Your Prompt (ํ•œ๊ธ€ ๋˜๋Š” ์˜์–ด)",
280
+ placeholder="์ด๋ฏธ์ง€๋ฅผ ์„ค๋ช…ํ•˜์„ธ์š”...",
281
+ lines=5
282
  )
283
+ generate_button = gr.Button(
284
+ "๐Ÿš€ Generate Image",
285
+ elem_classes="generate-btn"
 
 
 
286
  )
287
+
288
+ # ๊ณ ๊ธ‰ ์˜ต์…˜
289
+ with gr.Accordion("๐ŸŽจ Advanced Options", open=False, elem_classes="accordion box-common"):
290
+ with gr.Group(elem_classes="parameter-box"):
291
+ gr.Markdown("### ๐ŸŽ›๏ธ Generation Parameters")
292
+ with gr.Row():
293
+ with gr.Column():
294
+ cfg_scale = gr.Slider(
295
+ label="CFG Scale",
296
+ minimum=1,
297
+ maximum=20,
298
+ step=0.5,
299
+ value=example_cfg_scale
300
+ )
301
+ steps = gr.Slider(
302
+ label="Steps",
303
+ minimum=1,
304
+ maximum=100,
305
+ step=1,
306
+ value=example_steps
307
+ )
308
+ lora_scale = gr.Slider(
309
+ label="LoRA Scale",
310
+ minimum=0,
311
+ maximum=1,
312
+ step=0.01,
313
+ value=example_lora_scale
314
+ )
315
+
316
+ with gr.Group(elem_classes="parameter-box"):
317
+ gr.Markdown("### ๐Ÿ“ Image Dimensions")
318
+ with gr.Row():
319
+ width = gr.Slider(
320
+ label="Width",
321
+ minimum=256,
322
+ maximum=1536,
323
+ step=64,
324
+ value=example_width
325
+ )
326
+ height = gr.Slider(
327
+ label="Height",
328
+ minimum=256,
329
+ maximum=1536,
330
+ step=64,
331
+ value=example_height
332
+ )
333
+
334
+ with gr.Group(elem_classes="parameter-box"):
335
+ gr.Markdown("### ๐ŸŽฒ Seed Settings")
336
+ with gr.Row():
337
+ randomize_seed = gr.Checkbox(
338
+ True,
339
+ label="Randomize seed"
340
+ )
341
+ seed = gr.Slider(
342
+ label="Seed",
343
+ minimum=0,
344
+ maximum=MAX_SEED,
345
+ step=1,
346
+ value=example_seed
347
+ )
348
 
349
  # ์˜ค๋””์˜ค ์ปจํŠธ๋กค
350
  gr.HTML(f"""