Update app.py
Browse files
app.py
CHANGED
|
@@ -94,7 +94,7 @@ def generate_gif_callback(video_path, start_time_str, end_time_str, resolution_p
|
|
| 94 |
try:
|
| 95 |
with tempfile.NamedTemporaryFile(suffix=".gif", delete=False) as tmp:
|
| 96 |
gif_path = tmp.name
|
| 97 |
-
loop_value = loop_count
|
| 98 |
logging.info("GIF μμ± μ€...")
|
| 99 |
subclip.write_gif(gif_path, fps=frame_rate, loop=loop_value)
|
| 100 |
logging.info("GIF μμ± μλ£")
|
|
@@ -110,7 +110,8 @@ with gr.Blocks() as demo:
|
|
| 110 |
gr.Markdown("## λμμ μ
λ‘λ λ° GIF λ³ν μ€νμ΄μ€")
|
| 111 |
with gr.Row():
|
| 112 |
with gr.Column():
|
| 113 |
-
|
|
|
|
| 114 |
video_output = gr.Video(label="μ
λ‘λλ λμμ μ¬μ")
|
| 115 |
video_info_text = gr.Textbox(label="μμ μ 보", interactive=False)
|
| 116 |
with gr.Column():
|
|
|
|
| 94 |
try:
|
| 95 |
with tempfile.NamedTemporaryFile(suffix=".gif", delete=False) as tmp:
|
| 96 |
gif_path = tmp.name
|
| 97 |
+
loop_value = loop_count # 0μ΄λ©΄ 무νλ°λ³΅
|
| 98 |
logging.info("GIF μμ± μ€...")
|
| 99 |
subclip.write_gif(gif_path, fps=frame_rate, loop=loop_value)
|
| 100 |
logging.info("GIF μμ± μλ£")
|
|
|
|
| 110 |
gr.Markdown("## λμμ μ
λ‘λ λ° GIF λ³ν μ€νμ΄μ€")
|
| 111 |
with gr.Row():
|
| 112 |
with gr.Column():
|
| 113 |
+
# "type" μΈμλ₯Ό μ κ±°ν©λλ€.
|
| 114 |
+
video_input = gr.Video(label="λμμ μ
λ‘λ")
|
| 115 |
video_output = gr.Video(label="μ
λ‘λλ λμμ μ¬μ")
|
| 116 |
video_info_text = gr.Textbox(label="μμ μ 보", interactive=False)
|
| 117 |
with gr.Column():
|