Yaroslav commited on
Commit
4b9964c
·
verified ·
1 Parent(s): 52775ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import numpy as np
3
  import cv2
4
 
5
  def interpolate_frames(video_file, num_interpolations):
6
- cap = cv2.VideoCapture(video_file.name)
7
  frames = []
8
  while cap.isOpened():
9
  ret, frame = cap.read()
@@ -28,7 +28,7 @@ def interpolate_frames(video_file, num_interpolations):
28
  # Create a Gradio interface
29
  with gr.Blocks() as demo:
30
  gr.Markdown("## Video Frame Interpolation")
31
- video_input = gr.Video(label="Input Video", sources=["upload"])
32
  num_interpolations = gr.Slider(1, 10, step=1, label="Number of Interpolations")
33
  video_output = gr.Video(label="Interpolated Video")
34
  start_button = gr.Button("Start Interpolation")
 
3
  import cv2
4
 
5
  def interpolate_frames(video_file, num_interpolations):
6
+ cap = cv2.VideoCapture(video_file)
7
  frames = []
8
  while cap.isOpened():
9
  ret, frame = cap.read()
 
28
  # Create a Gradio interface
29
  with gr.Blocks() as demo:
30
  gr.Markdown("## Video Frame Interpolation")
31
+ video_input = gr.File(label="Input Video")
32
  num_interpolations = gr.Slider(1, 10, step=1, label="Number of Interpolations")
33
  video_output = gr.Video(label="Interpolated Video")
34
  start_button = gr.Button("Start Interpolation")