Zeimoto commited on
Commit
c51d817
·
1 Parent(s): 06aa1cd

fix in translation response

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,10 +34,10 @@ def main ():
34
  #st.audio(wav_audio_data, format='audio/wav')
35
  original = transcribe(wav_audio_data, s2t)
36
  st.write(f"Transcription: {original}")
37
- translation = translate(original)
38
  st.write(f"Translation: {translation}")
39
 
40
- if translation is not None and ner is not None:
41
  st.write('Entities: ', get_entity_labels(model=ner, text=translation))
42
  loading_elapsedtime = audit_elapsedtime(function="Loading data", start=start_loading)
43
 
 
34
  #st.audio(wav_audio_data, format='audio/wav')
35
  original = transcribe(wav_audio_data, s2t)
36
  st.write(f"Transcription: {original}")
37
+ translation = translate(original)[0]['generated_text']
38
  st.write(f"Translation: {translation}")
39
 
40
+ if translation is not None and ner is not None:
41
  st.write('Entities: ', get_entity_labels(model=ner, text=translation))
42
  loading_elapsedtime = audit_elapsedtime(function="Loading data", start=start_loading)
43