Spaces:
Runtime error
Runtime error
Update run.py
Browse files
run.py
CHANGED
@@ -2,6 +2,15 @@ import os
|
|
2 |
import numpy as np
|
3 |
import gradio as gr
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
def handle_audio(audio):
|
6 |
sr, y = audio
|
7 |
return sr, y.shape, audio
|
@@ -26,4 +35,4 @@ with gr.Blocks() as demo:
|
|
26 |
up2.click(handle_audio, a2, [sr2, len2, a2out])
|
27 |
|
28 |
if __name__ == "__main__":
|
29 |
-
demo.queue().launch()
|
|
|
2 |
import numpy as np
|
3 |
import gradio as gr
|
4 |
|
5 |
+
import subprocess
|
6 |
+
def get_ffmpeg_version():
|
7 |
+
output = subprocess.check_output(['ffmpeg', '-version'], stderr=subprocess.STDOUT)
|
8 |
+
output = output.decode('utf-8') # Convert bytes to string
|
9 |
+
return output
|
10 |
+
print(get_ffmpeg_version())
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
def handle_audio(audio):
|
15 |
sr, y = audio
|
16 |
return sr, y.shape, audio
|
|
|
35 |
up2.click(handle_audio, a2, [sr2, len2, a2out])
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
+
demo.queue().launch()
|