qanastek commited on
Commit
138be94
β€’
1 Parent(s): 9eb9cf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -3
app.py CHANGED
@@ -87,8 +87,24 @@ audio_paths = [
87
  "/users/ylabrak/Alexa_NLU/Pipeline/wavs/TTS_1/tell-me-the-artist-of-this-song.wav",
88
  ]
89
 
90
- def greet(name):
91
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
94
  iface.launch()
 
87
  "/users/ylabrak/Alexa_NLU/Pipeline/wavs/TTS_1/tell-me-the-artist-of-this-song.wav",
88
  ]
89
 
90
+ def predict(wav_file):
91
+ res = process(wav_file)
92
+ return res["text"]
93
+
94
+ # iface = gr.Interface(fn=predict, inputs="text", outputs="text")
95
+
96
+ iface = gr.Interface(
97
+ predict,
98
+ title='Alexa NLU Clone',
99
+ description='Upload your wav file to test the model',
100
+ inputs=[
101
+ gr.inputs.Audio(label='wav file', source='microphone', type='filepath')
102
+ ],
103
+ outputs=[
104
+ gr.outputs.Textbox(label='decoding result'),
105
+ ],
106
+ examples=examples,
107
+ article='Made with ❀️ by Yanis Labrak thanks to πŸ€—',
108
+ )
109
 
 
110
  iface.launch()