Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,11 +5,10 @@ import gradio as gr
|
|
| 5 |
from gtts import gTTS
|
| 6 |
from groq import Groq
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
os.
|
| 10 |
-
groq_client = Groq(api_key=
|
| 11 |
|
| 12 |
-
# Attempt to load Whisper model
|
| 13 |
try:
|
| 14 |
whisper_model = whisper.load_model("base")
|
| 15 |
except AttributeError:
|
|
|
|
| 5 |
from gtts import gTTS
|
| 6 |
from groq import Groq
|
| 7 |
|
| 8 |
+
# Load Groq API key from environment variable or secrets manager
|
| 9 |
+
groq_api_key = os.getenv('GROQ_API_KEY')
|
| 10 |
+
groq_client = Groq(api_key=groq_api_key)
|
| 11 |
|
|
|
|
| 12 |
try:
|
| 13 |
whisper_model = whisper.load_model("base")
|
| 14 |
except AttributeError:
|