Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -136,6 +136,10 @@ def infer(video_in):
|
|
136 |
# Save the cut video
|
137 |
cut_video.write_videofile(output_video_path, codec='libx264', audio_codec='aac')
|
138 |
print(f"Cut video saved as: {output_video_path}")
|
|
|
|
|
|
|
|
|
139 |
else:
|
140 |
print("Video is 10 seconds or shorter; no cutting needed.")
|
141 |
|
|
|
136 |
# Save the cut video
|
137 |
cut_video.write_videofile(output_video_path, codec='libx264', audio_codec='aac')
|
138 |
print(f"Cut video saved as: {output_video_path}")
|
139 |
+
|
140 |
+
# Delete the original video file
|
141 |
+
os.remove(input_video_path)
|
142 |
+
print(f"Original video file {input_video_path} deleted.")
|
143 |
else:
|
144 |
print("Video is 10 seconds or shorter; no cutting needed.")
|
145 |
|