Commit
·
08bd4c4
1
Parent(s):
61458af
Update app.py
Browse files
app.py
CHANGED
@@ -30,10 +30,10 @@ def predict(text):
|
|
30 |
|
31 |
with tempfile.NamedTemporaryFile(suffix='.mp4') as tmp:
|
32 |
video_path = gr.make_waveform((32000, outputs[0].cpu().numpy().astype(np.float16).ravel()), bars_color=random.choice(COLORS), bar_count=75)
|
33 |
-
command = f'ffmpeg -y -i {video_path} -vf "scale=250:150"
|
34 |
-
subprocess.run(command
|
35 |
|
36 |
-
return (32000, outputs[0][0].cpu().numpy().astype(np.float16)),
|
37 |
|
38 |
|
39 |
title = "MusicGen"
|
|
|
30 |
|
31 |
with tempfile.NamedTemporaryFile(suffix='.mp4') as tmp:
|
32 |
video_path = gr.make_waveform((32000, outputs[0].cpu().numpy().astype(np.float16).ravel()), bars_color=random.choice(COLORS), bar_count=75)
|
33 |
+
command = f'ffmpeg -y -i {video_path} -vf "scale=250:150" result.mp4'
|
34 |
+
subprocess.run(command, shell=True)
|
35 |
|
36 |
+
return (32000, outputs[0][0].cpu().numpy().astype(np.float16)), "result.mp4"
|
37 |
|
38 |
|
39 |
title = "MusicGen"
|