fffiloni commited on
Commit
5526f7f
β€’
1 Parent(s): a1d35c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,8 +82,8 @@ def translate_better(audio):
82
  Sending audio to Whisper ...
83
  β€”
84
  """)
85
- transcribe_text_result = whisper(audio, None, "transcribe", fn_index=0)
86
- translate_text_result = whisper(audio, None, "translate", fn_index=0)
87
  print("transcript: " + transcribe_text_result)
88
  print("β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”")
89
  print("translated: " + translate_text_result)
 
82
  Sending audio to Whisper ...
83
  β€”
84
  """)
85
+ transcribe_text_result = whisper(audio, None, "transcribe", api_name="predict")
86
+ translate_text_result = whisper(audio, None, "translate", api_name="predict")
87
  print("transcript: " + transcribe_text_result)
88
  print("β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”")
89
  print("translated: " + translate_text_result)