Engr-Saeed commited on
Commit
a7d008d
·
verified ·
1 Parent(s): cf0fa01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -5,8 +5,10 @@ from gtts import gTTS
5
  from groq import Groq
6
  import numpy as np
7
 
8
- # Set your Groq API key
9
- api_key = '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'
 
 
10
 
11
  # Initialize Whisper and Groq
12
  whisper_model = whisper.load_model("base")
 
5
  from groq import Groq
6
  import numpy as np
7
 
8
+ # Load the Groq API key from the environment variable
9
+ api_key = os.getenv("GROQ_API_KEY")
10
+ if not api_key:
11
+ raise ValueError("No API key found. Please set the GROQ_API_KEY environment variable.")
12
 
13
  # Initialize Whisper and Groq
14
  whisper_model = whisper.load_model("base")