Update infer.py
Browse files
infer.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
from RealESRGAN import RealESRGAN
|
5 |
import tempfile
|
6 |
import numpy as np
|
7 |
-
import tqdm
|
8 |
import pydub
|
9 |
from pydub import AudioSegment
|
10 |
from moviepy.editor import VideoFileClip, AudioFileClip
|
@@ -53,7 +53,7 @@ def infer_video(video_filepath: str, size_modifier: int) -> str:
|
|
53 |
|
54 |
# Process each frame of the video and write it to the output video
|
55 |
n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
|
56 |
-
for i in tqdm(range(n_frames)):
|
57 |
# Read the next frame
|
58 |
ret, frame = cap.read()
|
59 |
if not ret:
|
|
|
4 |
from RealESRGAN import RealESRGAN
|
5 |
import tempfile
|
6 |
import numpy as np
|
7 |
+
from tqdm import tqdm
|
8 |
import pydub
|
9 |
from pydub import AudioSegment
|
10 |
from moviepy.editor import VideoFileClip, AudioFileClip
|
|
|
53 |
|
54 |
# Process each frame of the video and write it to the output video
|
55 |
n_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
|
56 |
+
for i in tqdm.tqdm(range(n_frames)):
|
57 |
# Read the next frame
|
58 |
ret, frame = cap.read()
|
59 |
if not ret:
|