Sangwon78 commited on
Commit
3b975fd
Β·
verified Β·
1 Parent(s): 3a26be0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- video_input = gr.Video(label="λ™μ˜μƒ μ—…λ‘œλ“œ", type="filepath")
 
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():