Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,11 @@ from faster_whisper import WhisperModel
|
|
13 |
from pathlib import Path
|
14 |
from pydub import AudioSegment
|
15 |
|
16 |
-
#
|
|
|
|
|
|
|
|
|
17 |
# Initialize session history & flags
|
18 |
# ------------------------
|
19 |
if "history" not in st.session_state:
|
|
|
13 |
from pathlib import Path
|
14 |
from pydub import AudioSegment
|
15 |
|
16 |
+
# Load environment variable for GROQ API KEY
|
17 |
+
GROQ_API_KEY = os.environ.get ("GROQ_API_KEY")
|
18 |
+
if not GROQ_API_KEY:
|
19 |
+
raise ValueError("please set the GROQ_API_KEY environment variable")
|
20 |
+
# --------------------.get ()----
|
21 |
# Initialize session history & flags
|
22 |
# ------------------------
|
23 |
if "history" not in st.session_state:
|