Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
e3258c1
1
Parent(s):
3117ce4
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,10 @@ model = torch.hub.load("PeterL1n/RobustVideoMatting", "mobilenetv3") # or "resne
|
|
10 |
convert_video = torch.hub.load("PeterL1n/RobustVideoMatting", "converter")
|
11 |
|
12 |
def inference(video):
|
13 |
-
os.system('rm output.mp4')
|
14 |
#clip = VideoFileClip(video).subclip(0, 5)
|
15 |
#clip.write_videofile("output.mp4")
|
16 |
-
os.system('ffmpeg -ss 00:00:00 -i '+ video +' -to 00:00:05 -c copy output.mp4')
|
17 |
convert_video(
|
18 |
model, # The loaded model, can be on any device (cpu or cuda).
|
19 |
input_source='output.mp4', # A video file or an image sequence directory.
|
|
|
10 |
convert_video = torch.hub.load("PeterL1n/RobustVideoMatting", "converter")
|
11 |
|
12 |
def inference(video):
|
13 |
+
#os.system('rm output.mp4')
|
14 |
#clip = VideoFileClip(video).subclip(0, 5)
|
15 |
#clip.write_videofile("output.mp4")
|
16 |
+
os.system('ffmpeg -ss 00:00:00 -i '+ video +' -to 00:00:05 -c copy -y output.mp4')
|
17 |
convert_video(
|
18 |
model, # The loaded model, can be on any device (cpu or cuda).
|
19 |
input_source='output.mp4', # A video file or an image sequence directory.
|