boi-doingthings commited on
Commit
d16605a
·
verified ·
1 Parent(s): c805d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -3,7 +3,6 @@ import gradio as gr
3
  import numpy as np
4
  import whisper
5
  from openai import OpenAI
6
- from transformers import pipeline
7
  from scipy.io.wavfile import write
8
  client = OpenAI()
9
 
@@ -36,9 +35,8 @@ def transcribe(audio,key):
36
  if audio is None:
37
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
38
  if key != "None":
39
- print(os.environ['OPENAI_API_KEY'])
40
  openai.api_key=key
41
- print(os.environ['OPENAI_API_KEY'])
42
  sr, y = audio
43
  y = y.astype(np.float32)
44
  y /= np.max(np.abs(y))
 
3
  import numpy as np
4
  import whisper
5
  from openai import OpenAI
 
6
  from scipy.io.wavfile import write
7
  client = OpenAI()
8
 
 
35
  if audio is None:
36
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
37
  if key != "None":
 
38
  openai.api_key=key
39
+
40
  sr, y = audio
41
  y = y.astype(np.float32)
42
  y /= np.max(np.abs(y))