Enutrof commited on
Commit
d1aa7b7
·
1 Parent(s): 4821816

edited app file.

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,10 +1,12 @@
 
1
  import gradio as gr
2
  from inference import *
3
 
4
- def greet(name):
5
- return "Hello " + name + "!"
 
6
 
7
  iface = gr.Interface(fn=inference,
8
  inputs=gr.inputs.Audio(source="upload", type="filepath"),
9
  outputs="text")
10
- iface.launch()
 
1
+ import subprocess, platform
2
  import gradio as gr
3
  from inference import *
4
 
5
+ if platform.system() == 'Linux':
6
+ subprocess.call(['sudo', 'apt-get install', 'libsndfile1'])
7
+ subprocess.call(['sudo', 'apt-get install', 'ffmpeg'])
8
 
9
  iface = gr.Interface(fn=inference,
10
  inputs=gr.inputs.Audio(source="upload", type="filepath"),
11
  outputs="text")
12
+ iface.launch(share=True)