Slava917 commited on
Commit
877be96
1 Parent(s): 5121ebc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
  import torchaudio
3
 
@@ -29,6 +30,4 @@ def predict(path):
29
  probs = model(audio, torch.tensor(audio.shape[0] * [audio.shape[-1]], device=audio.device))[0]
30
  return convert_probs(probs)
31
 
32
- gr.Interface(fn=predict,
33
- inputs=[gr.inputs.Audio(source='microphone', type='filepath', optional=True)],
34
- outputs= 'text').launch(debug=True)
 
1
+ import gradio as gr
2
  import torch
3
  import torchaudio
4
 
 
30
  probs = model(audio, torch.tensor(audio.shape[0] * [audio.shape[-1]], device=audio.device))[0]
31
  return convert_probs(probs)
32
 
33
+ gr.Interface(fn=predict, inputs=[gr.inputs.Audio(source='microphone', type='filepath', optional=True)], outputs= 'text').launch(debug=True)