awacke1 commited on
Commit
1a1e9ca
·
1 Parent(s): 9e1cccd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -49,8 +49,10 @@ def generate_filename(prompt, file_type):
49
 
50
  def transcribe_audio(openai_key, file_path, model):
51
  OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"
 
 
52
  headers = {
53
- "Authorization": f"Bearer {openai_key}",
54
  }
55
  with open(file_path, 'rb') as f:
56
  data = {'file': f}
 
49
 
50
  def transcribe_audio(openai_key, file_path, model):
51
  OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"
52
+ key = os.getenv('OPENAI_KEY')
53
+
54
  headers = {
55
+ "Authorization": f"Bearer {key}",
56
  }
57
  with open(file_path, 'rb') as f:
58
  data = {'file': f}