patrickvonplaten commited on
Commit
3c11f4a
1 Parent(s): 13a6bac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -22,9 +22,9 @@ def restore(audio, original_transcript):
22
  print(error)
23
  data, samplerate = librosa.load(path, sr=16_000)
24
 
25
- text, _ = restorer(data, original_transcript, samplerate, num_beams=1)
26
 
27
- return text
28
 
29
 
30
  gr.Interface(
@@ -36,6 +36,7 @@ gr.Interface(
36
  ],
37
  outputs=[
38
  gr.outputs.Textbox(label='Restored text'),
 
39
  ],
40
  examples=[
41
  ["./common_voice_en_18301577.mp3", "do not cross the yellow light"],
 
22
  print(error)
23
  data, samplerate = librosa.load(path, sr=16_000)
24
 
25
+ text, log_probs = restorer(data, original_transcript, samplerate, num_beams=1)
26
 
27
+ return text, log_probs
28
 
29
 
30
  gr.Interface(
 
36
  ],
37
  outputs=[
38
  gr.outputs.Textbox(label='Restored text'),
39
+ gr.outputs.Number(label='Log probability')
40
  ],
41
  examples=[
42
  ["./common_voice_en_18301577.mp3", "do not cross the yellow light"],