Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,10 @@ from gtts import gTTS
|
|
5 |
from groq import Groq
|
6 |
import numpy as np
|
7 |
|
8 |
-
#
|
9 |
-
api_key =
|
|
|
|
|
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")
|