Update app.py
Browse files
app.py
CHANGED
|
@@ -721,7 +721,6 @@ def process_video_bg(vid, bg_type="์์", bg_image=None, bg_video=None, color=
|
|
| 721 |
yield gr.update(visible=False), gr.update(visible=True), f"๋น๋์ค ์ฒ๋ฆฌ ์ค๋ฅ: {e}. ๊ฒฝ๊ณผ ์๊ฐ: {elapsed_time:.2f}์ด"
|
| 722 |
yield None, None, f"๋น๋์ค ์ฒ๋ฆฌ ์ค๋ฅ: {e}. ๊ฒฝ๊ณผ ์๊ฐ: {elapsed_time:.2f}์ด"
|
| 723 |
|
| 724 |
-
@spaces.GPU(duration=180)
|
| 725 |
@spaces.GPU(duration=180)
|
| 726 |
def merge_videos_with_audio(video_files, audio_file, audio_mode, audio_volume, original_audio_volume, output_fps):
|
| 727 |
"""์ฌ๋ฌ ๋น๋์ค๋ฅผ ๋ณํฉํ๊ณ ์ค๋์ค๋ฅผ ์ถ๊ฐํ๋ ํจ์"""
|
|
@@ -1137,7 +1136,7 @@ with demo:
|
|
| 1137 |
)
|
| 1138 |
|
| 1139 |
|
| 1140 |
-
# ๋ค ๋ฒ์งธ ํญ: ๋น๋์ค ํธ์ง ๋ถ๋ถ์ ๋ค์๊ณผ ๊ฐ์ด ์์
|
| 1141 |
with gr.Tab("๋น๋์ค ํธ์ง", elem_classes="tabitem"):
|
| 1142 |
with gr.Row(equal_height=True):
|
| 1143 |
# ์
๋ ฅ ์ปฌ๋ผ
|
|
@@ -1152,11 +1151,30 @@ with demo:
|
|
| 1152 |
file_types=["video"],
|
| 1153 |
type="filepath"
|
| 1154 |
)
|
| 1155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1156 |
with gr.Group(elem_classes="panel-box"):
|
| 1157 |
gr.Markdown("### ๐ต ์ค๋์ค ์ค์ (์ ํ)")
|
| 1158 |
|
| 1159 |
-
|
| 1160 |
audio_mode = gr.Radio(
|
| 1161 |
["๋์ฒด", "๋ฐฑ๊ทธ๋ผ์ด๋ ๋ฎค์ง"],
|
| 1162 |
label="์ค๋์ค ๋ชจ๋",
|
|
@@ -1179,7 +1197,7 @@ with demo:
|
|
| 1179 |
info="100% = ์๋ณธ ๋ณผ๋ฅจ"
|
| 1180 |
)
|
| 1181 |
|
| 1182 |
-
|
| 1183 |
original_audio_volume = gr.Slider(
|
| 1184 |
minimum=0,
|
| 1185 |
maximum=200,
|
|
|
|
| 721 |
yield gr.update(visible=False), gr.update(visible=True), f"๋น๋์ค ์ฒ๋ฆฌ ์ค๋ฅ: {e}. ๊ฒฝ๊ณผ ์๊ฐ: {elapsed_time:.2f}์ด"
|
| 722 |
yield None, None, f"๋น๋์ค ์ฒ๋ฆฌ ์ค๋ฅ: {e}. ๊ฒฝ๊ณผ ์๊ฐ: {elapsed_time:.2f}์ด"
|
| 723 |
|
|
|
|
| 724 |
@spaces.GPU(duration=180)
|
| 725 |
def merge_videos_with_audio(video_files, audio_file, audio_mode, audio_volume, original_audio_volume, output_fps):
|
| 726 |
"""์ฌ๋ฌ ๋น๋์ค๋ฅผ ๋ณํฉํ๊ณ ์ค๋์ค๋ฅผ ์ถ๊ฐํ๋ ํจ์"""
|
|
|
|
| 1136 |
)
|
| 1137 |
|
| 1138 |
|
| 1139 |
+
# ๋ค ๋ฒ์งธ ํญ: ๋น๋์ค ํธ์ง ๋ถ๋ถ์ ๋ค์๊ณผ ๊ฐ์ด ์์
|
| 1140 |
with gr.Tab("๋น๋์ค ํธ์ง", elem_classes="tabitem"):
|
| 1141 |
with gr.Row(equal_height=True):
|
| 1142 |
# ์
๋ ฅ ์ปฌ๋ผ
|
|
|
|
| 1151 |
file_types=["video"],
|
| 1152 |
type="filepath"
|
| 1153 |
)
|
| 1154 |
+
|
| 1155 |
+
with gr.Group(elem_classes="panel-box"):
|
| 1156 |
+
gr.Markdown("### โ๏ธ ํธ์ง ์ค์ ")
|
| 1157 |
+
|
| 1158 |
+
output_fps = gr.Slider(
|
| 1159 |
+
minimum=0,
|
| 1160 |
+
maximum=60,
|
| 1161 |
+
value=0,
|
| 1162 |
+
step=1,
|
| 1163 |
+
label="์ถ๋ ฅ FPS (0 = ์ฒซ ๋ฒ์งธ ๋น๋์ค์ FPS ์ฌ์ฉ)"
|
| 1164 |
+
)
|
| 1165 |
+
|
| 1166 |
+
gr.Markdown("""
|
| 1167 |
+
**ํฌ๊ธฐ ์ฒ๋ฆฌ**:
|
| 1168 |
+
- ์ฒซ ๋ฒ์งธ ๋น๋์ค์ ํฌ๊ธฐ๊ฐ ๊ธฐ์ค์ด ๋ฉ๋๋ค
|
| 1169 |
+
- ๋ค๋ฅธ ํฌ๊ธฐ์ ๋น๋์ค๋ ์ฒซ ๋ฒ์งธ ๋น๋์ค ํฌ๊ธฐ๋ก ์กฐ์ ๋ฉ๋๋ค
|
| 1170 |
+
- ์ต์์ ๊ฒฐ๊ณผ๋ฅผ ์ํด ๊ฐ์ ํฌ๊ธฐ์ ๋น๋์ค๋ฅผ ์ฌ์ฉํ์ธ์
|
| 1171 |
+
""")
|
| 1172 |
+
|
| 1173 |
+
|
| 1174 |
with gr.Group(elem_classes="panel-box"):
|
| 1175 |
gr.Markdown("### ๐ต ์ค๋์ค ์ค์ (์ ํ)")
|
| 1176 |
|
| 1177 |
+
# ์ค๋์ค ๋ชจ๋ ์ ํ ์ถ๊ฐ
|
| 1178 |
audio_mode = gr.Radio(
|
| 1179 |
["๋์ฒด", "๋ฐฑ๊ทธ๋ผ์ด๋ ๋ฎค์ง"],
|
| 1180 |
label="์ค๋์ค ๋ชจ๋",
|
|
|
|
| 1197 |
info="100% = ์๋ณธ ๋ณผ๋ฅจ"
|
| 1198 |
)
|
| 1199 |
|
| 1200 |
+
# ๋ฐฑ๊ทธ๋ผ์ด๋ ๋ชจ๋์ผ ๋๋ง ๋ณด์ด๋ ์๋ณธ ์ค๋์ค ๋ณผ๋ฅจ ์กฐ์
|
| 1201 |
original_audio_volume = gr.Slider(
|
| 1202 |
minimum=0,
|
| 1203 |
maximum=200,
|