Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,22 +14,15 @@ for model_id in model_ids:
|
|
| 14 |
snapshot_download(model_id, local_dir=f'checkpoints/{model_name}')
|
| 15 |
|
| 16 |
import subprocess
|
| 17 |
-
from moviepy.editor import VideoFileClip
|
| 18 |
|
| 19 |
-
def get_video_properties(filepath):
|
| 20 |
-
video = VideoFileClip(filepath)
|
| 21 |
-
duration = video.duration
|
| 22 |
-
fps = video.fps
|
| 23 |
-
video.close()
|
| 24 |
-
return duration, fps
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
def run_inference(prompt, video_path, condition, video_length):
|
| 30 |
# Call the function to get the video properties
|
| 31 |
-
duration, fps = get_video_properties(video_path)
|
| 32 |
-
print(fps)
|
| 33 |
#video_length = int(video_length * fps)
|
| 34 |
output_path = 'output/'
|
| 35 |
os.makedirs(output_path, exist_ok=True)
|
|
|
|
| 14 |
snapshot_download(model_id, local_dir=f'checkpoints/{model_name}')
|
| 15 |
|
| 16 |
import subprocess
|
|
|
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
def run_inference(prompt, video_path, condition, video_length):
|
| 23 |
# Call the function to get the video properties
|
| 24 |
+
# duration, fps = get_video_properties(video_path)
|
| 25 |
+
#print(fps)
|
| 26 |
#video_length = int(video_length * fps)
|
| 27 |
output_path = 'output/'
|
| 28 |
os.makedirs(output_path, exist_ok=True)
|