Spaces:
Sleeping
Sleeping
roychao19477
commited on
Commit
·
79194d9
1
Parent(s):
ae53f84
Update module
Browse files
app.py
CHANGED
@@ -91,6 +91,7 @@ def run_avse_inference(video_path, audio_path):
|
|
91 |
vr = VideoReader(video_path, ctx=cpu(0))
|
92 |
frames = vr.get_batch(list(range(len(vr)))).asnumpy()
|
93 |
bg_frames = np.array([cv2.cvtColor(f, cv2.COLOR_RGB2GRAY) for f in frames]).astype(np.float32) / 255.0
|
|
|
94 |
|
95 |
# Combine into input dict (match what model.enhance expects)
|
96 |
data = {
|
|
|
91 |
vr = VideoReader(video_path, ctx=cpu(0))
|
92 |
frames = vr.get_batch(list(range(len(vr)))).asnumpy()
|
93 |
bg_frames = np.array([cv2.cvtColor(f, cv2.COLOR_RGB2GRAY) for f in frames]).astype(np.float32) / 255.0
|
94 |
+
bg_frames = np.expand_dims(bg_frames, axis=0)
|
95 |
|
96 |
# Combine into input dict (match what model.enhance expects)
|
97 |
data = {
|