Yusin commited on
Commit
1821feb
1 Parent(s): 6fdfd9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -9,7 +9,7 @@ default_lang = "en"
9
  #import whisper
10
  #whisper_model = whisper.load_model("small")
11
  whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
12
- chatgpt = gr.Interface.load(name="spaces/fffiloni/whisper-to-chatGPT")
13
  import os
14
  #session_token = os.environ.get('SessionToken')
15
  #api = os.environ.get('API_ENDPOINT')
@@ -31,7 +31,8 @@ coquiTTS = CoquiTTS()
31
 
32
  # ChatGPT
33
  def chat_hf(audio, custom_token, language):
34
- output = chatgpt(audio, "transcribe")
 
35
  print(output)
36
  whisper_text, gpt_response = output[0], output[1]
37
  '''
 
9
  #import whisper
10
  #whisper_model = whisper.load_model("small")
11
  whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
12
+ chatgpt = gr.Blocks.load(name="spaces/fffiloni/whisper-to-chatGPT")
13
  import os
14
  #session_token = os.environ.get('SessionToken')
15
  #api = os.environ.get('API_ENDPOINT')
 
31
 
32
  # ChatGPT
33
  def chat_hf(audio, custom_token, language):
34
+ output = chatgpt(audio, "transcribe", fn_index=0)
35
+ print('1111111111111')
36
  print(output)
37
  whisper_text, gpt_response = output[0], output[1]
38
  '''