henryu commited on
Commit
fbeca34
·
1 Parent(s): 45a835e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def transcribe(microphone, file_upload):
24
  openai.api_key = "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"
25
  device = 0 if torch.cuda.is_available() else "cpu"
26
  res_format = 'srt'
27
- transcript = openai.Audio.transcribe(model="whisper-1", file=open('file', 'rb'), response_format=res_format, prompt='请使用书面语')
28
 
29
  text = transcript
30
 
 
24
  openai.api_key = "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"
25
  device = 0 if torch.cuda.is_available() else "cpu"
26
  res_format = 'srt'
27
+ transcript = openai.Audio.transcribe(model="whisper-1", file=open(file, 'rb'), response_format=res_format, prompt='请使用书面语')
28
 
29
  text = transcript
30