Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,17 @@ from groq import Groq
|
|
| 9 |
#GROQ_api_key = os.getenv("Groq_Api_Key")
|
| 10 |
#client = Groq(api_key= GROQ_api_key)
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Load Whisper model
|
| 16 |
whisper_model = whisper.load_model("base")
|
|
|
|
| 9 |
#GROQ_api_key = os.getenv("Groq_Api_Key")
|
| 10 |
#client = Groq(api_key= GROQ_api_key)
|
| 11 |
|
| 12 |
+
|
| 13 |
+
api_key = os.environ.get("Groq_Api_Key")
|
| 14 |
+
|
| 15 |
+
if not api_key:
|
| 16 |
+
raise ValueError("GROQ_API_KEY is not set. Please add it in the Hugging Face Secrets.")
|
| 17 |
+
|
| 18 |
+
# Initialize Groq client
|
| 19 |
+
client = Groq(api_key=api_key)
|
| 20 |
+
|
| 21 |
+
#GROQ_api_key = "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"
|
| 22 |
+
#client = Groq(api_key= GROQ_api_key)
|
| 23 |
|
| 24 |
# Load Whisper model
|
| 25 |
whisper_model = whisper.load_model("base")
|