Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
9a33f22
1
Parent(s):
aef8896
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,9 @@ model = torch.hub.load("PeterL1n/RobustVideoMatting", "mobilenetv3") # or "resne
|
|
| 10 |
convert_video = torch.hub.load("PeterL1n/RobustVideoMatting", "converter")
|
| 11 |
|
| 12 |
def inference(video):
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
# os.system('rm output.mp4')
|
| 17 |
# os.system('ffmpeg -ss 00:00:00 -i '+ video +' -to 00:00:05 -c copy output.mp4')
|
| 18 |
convert_video(
|
|
|
|
| 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('rm output.mp4')
|
| 17 |
# os.system('ffmpeg -ss 00:00:00 -i '+ video +' -to 00:00:05 -c copy output.mp4')
|
| 18 |
convert_video(
|