Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -307,55 +307,73 @@ css = """
|
|
307 |
footer {
|
308 |
visibility: hidden;
|
309 |
}
|
310 |
-
"""
|
311 |
-
|
312 |
-
|
313 |
-
with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as iface:
|
314 |
-
|
315 |
-
with gr.Column():
|
316 |
-
txt2vid_prompt = gr.Textbox(
|
317 |
-
label="Step 1: Enter Your Prompt (ํ๊ธ ๋๋ ์์ด)",
|
318 |
-
placeholder="์์ฑํ๊ณ ์ถ์ ๋น๋์ค๋ฅผ ์ค๋ช
ํ์ธ์ (์ต์ 50์)...",
|
319 |
-
value="๊ธด ๊ฐ์ ๋จธ๋ฆฌ์ ๋ฐ์ ํผ๋ถ๋ฅผ ๊ฐ์ง ์ฌ์ฑ์ด ๊ธด ๊ธ๋ฐ ๋จธ๋ฆฌ๋ฅผ ๊ฐ์ง ๋ค๋ฅธ ์ฌ์ฑ์ ํฅํด ๋ฏธ์ ์ง์ต๋๋ค. ๊ฐ์ ๋จธ๋ฆฌ ์ฌ์ฑ์ ๊ฒ์ ์ฌํท์ ์
๊ณ ์์ผ๋ฉฐ ์ค๋ฅธ์ชฝ ๋บจ์ ์๊ณ ๊ฑฐ์ ๋์ ๋์ง ์๋ ์ ์ด ์์ต๋๋ค. ์นด๋ฉ๋ผ ์ต๊ธ์ ๊ฐ์ ๋จธ๋ฆฌ ์ฌ์ฑ์ ์ผ๊ตด์ ์ด์ ์ ๋ง์ถ ํด๋ก์ฆ์
์
๋๋ค. ์กฐ๋ช
์ ๋ฐ๋ปํ๊ณ ์์ฐ์ค๋ฌ์ฐ๋ฉฐ, ์๋ง๋ ์ง๋ ํด์์ ๋์ค๋ ๊ฒ ๊ฐ์ ์ฅ๋ฉด์ ๋ถ๋๋ฌ์ด ๋น์ ๋น์ถฅ๋๋ค.",
|
320 |
-
lines=5,
|
321 |
-
)
|
322 |
-
|
323 |
-
|
324 |
-
txt2vid_enhance_toggle = Toggle(
|
325 |
-
label="Enhance Prompt",
|
326 |
-
value=False,
|
327 |
-
interactive=True,
|
328 |
-
)
|
329 |
-
|
330 |
-
txt2vid_negative_prompt = gr.Textbox(
|
331 |
-
label="Step 2: Enter Negative Prompt",
|
332 |
-
placeholder="๋น๋์ค์์ ์ํ์ง ์๋ ์์๋ฅผ ์ค๋ช
ํ์ธ์...",
|
333 |
-
value="low quality, worst quality, deformed, distorted, damaged, motion blur, motion artifacts, fused fingers, incorrect anatomy, strange hands, ugly",
|
334 |
-
lines=2,
|
335 |
-
)
|
336 |
-
|
337 |
-
txt2vid_preset = gr.Dropdown(
|
338 |
-
choices=[p["label"] for p in preset_options],
|
339 |
-
value="512x512, 160 frames",
|
340 |
-
label="Step 3.1: Choose Resolution Preset",
|
341 |
-
)
|
342 |
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
)
|
350 |
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
|
|
357 |
|
358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
|
360 |
txt2vid_preset.change(
|
361 |
fn=preset_changed,
|
@@ -378,5 +396,4 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as iface:
|
|
378 |
queue=True,
|
379 |
)
|
380 |
|
381 |
-
iface.queue(max_size=64, default_concurrency_limit=1, api_open=False).launch(share=True, show_api=False)
|
382 |
-
# ===== Application Startup at 2024-12-20 01:30:34 =====
|
|
|
307 |
footer {
|
308 |
visibility: hidden;
|
309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
|
311 |
+
/* ๋น๋์ค ์ถ๋ ฅ ์ปจํ
์ด๋ ํฌ๊ธฐ ์กฐ์ */
|
312 |
+
.video-output-container {
|
313 |
+
max-width: 50%;
|
314 |
+
margin-left: auto;
|
315 |
+
margin-right: auto;
|
316 |
+
}
|
|
|
317 |
|
318 |
+
/* ๋น๋์ค ํ๋ ์ด์ด ํฌ๊ธฐ ์กฐ์ */
|
319 |
+
.video-player {
|
320 |
+
width: 100%;
|
321 |
+
max-height: 50vh;
|
322 |
+
object-fit: contain;
|
323 |
+
}
|
324 |
+
"""
|
325 |
|
326 |
+
with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css) as iface:
|
327 |
+
with gr.Row():
|
328 |
+
# ์
๋ ฅ ์น์
(์ผ์ชฝ)
|
329 |
+
with gr.Column(scale=1):
|
330 |
+
txt2vid_prompt = gr.Textbox(
|
331 |
+
label="Step 1: Enter Your Prompt (ํ๊ธ ๋๋ ์์ด)",
|
332 |
+
placeholder="์์ฑํ๊ณ ์ถ์ ๋น๋์ค๋ฅผ ์ค๋ช
ํ์ธ์ (์ต์ 50์)...",
|
333 |
+
value="๊ธด ๊ฐ์ ๋จธ๋ฆฌ์ ๋ฐ์ ํผ๋ถ๋ฅผ ๊ฐ์ง ์ฌ์ฑ์ด ๊ธด ๊ธ๋ฐ ๋จธ๋ฆฌ๋ฅผ ๊ฐ์ง ๋ค๋ฅธ ์ฌ์ฑ์ ํฅํด ๋ฏธ์ ์ง์ต๋๋ค. ๊ฐ์ ๋จธ๋ฆฌ ์ฌ์ฑ์ ๊ฒ์ ์ฌํท์ ์
๊ณ ์์ผ๋ฉฐ ์ค๋ฅธ์ชฝ ๋บจ์ ์๊ณ ๊ฑฐ์ ๋์ ๋์ง ์๋ ์ ์ด ์์ต๋๋ค. ์นด๋ฉ๋ผ ์ต๊ธ์ ๊ฐ์ ๋จธ๋ฆฌ ์ฌ์ฑ์ ์ผ๊ตด์ ์ด์ ์ ๋ง์ถ ํด๋ก์ฆ์
์
๋๋ค. ์กฐ๋ช
์ ๋ฐ๋ปํ๊ณ ์์ฐ์ค๋ฌ์ฐ๋ฉฐ, ์๋ง๋ ์ง๋ ํด์์ ๋์ค๋ ๊ฒ ๊ฐ์ ์ฅ๋ฉด์ ๋ถ๋๋ฌ์ด ๋น์ ๋น์ถฅ๋๋ค.",
|
334 |
+
lines=5,
|
335 |
+
)
|
336 |
+
|
337 |
+
txt2vid_enhance_toggle = Toggle(
|
338 |
+
label="Enhance Prompt",
|
339 |
+
value=False,
|
340 |
+
interactive=True,
|
341 |
+
)
|
342 |
+
|
343 |
+
txt2vid_negative_prompt = gr.Textbox(
|
344 |
+
label="Step 2: Enter Negative Prompt",
|
345 |
+
placeholder="๋น๋์ค์์ ์ํ์ง ์๋ ์์๋ฅผ ์ค๋ช
ํ์ธ์...",
|
346 |
+
value="low quality, worst quality, deformed, distorted, damaged, motion blur, motion artifacts, fused fingers, incorrect anatomy, strange hands, ugly",
|
347 |
+
lines=2,
|
348 |
+
)
|
349 |
+
|
350 |
+
txt2vid_preset = gr.Dropdown(
|
351 |
+
choices=[p["label"] for p in preset_options],
|
352 |
+
value="512x512, 160 frames",
|
353 |
+
label="Step 3.1: Choose Resolution Preset",
|
354 |
+
)
|
355 |
+
|
356 |
+
txt2vid_frame_rate = gr.Slider(
|
357 |
+
label="Step 3.2: Frame Rate",
|
358 |
+
minimum=6,
|
359 |
+
maximum=60,
|
360 |
+
step=1,
|
361 |
+
value=20,
|
362 |
+
)
|
363 |
+
|
364 |
+
txt2vid_advanced = create_advanced_options()
|
365 |
+
txt2vid_generate = gr.Button(
|
366 |
+
"Step 5: Generate Video",
|
367 |
+
variant="primary",
|
368 |
+
size="lg",
|
369 |
+
)
|
370 |
+
|
371 |
+
# ์ถ๋ ฅ ์น์
(์ค๋ฅธ์ชฝ)
|
372 |
+
with gr.Column(scale=1):
|
373 |
+
txt2vid_output = gr.Video(
|
374 |
+
label="Generated Output",
|
375 |
+
elem_classes=["video-output-container", "video-player"]
|
376 |
+
)
|
377 |
|
378 |
txt2vid_preset.change(
|
379 |
fn=preset_changed,
|
|
|
396 |
queue=True,
|
397 |
)
|
398 |
|
399 |
+
iface.queue(max_size=64, default_concurrency_limit=1, api_open=False).launch(share=True, show_api=False)
|
|