Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,15 @@ import pandas as pd
|
|
4 |
import requests
|
5 |
from groq import Groq
|
6 |
|
7 |
-
|
|
|
|
|
8 |
groq_api_key = os.getenv("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")
|
9 |
|
10 |
# Check if the API key is available
|
11 |
if not groq_api_key:
|
12 |
-
|
13 |
-
|
14 |
|
15 |
# Initialize the GROQ client with the fetched API key
|
16 |
groq_client = Groq(api_key=groq_api_key)
|
|
|
4 |
import requests
|
5 |
from groq import Groq
|
6 |
|
7 |
+
import os
|
8 |
+
|
9 |
+
# Fetch the API key
|
10 |
groq_api_key = os.getenv("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")
|
11 |
|
12 |
# Check if the API key is available
|
13 |
if not groq_api_key:
|
14 |
+
raise ValueError("GROQ_API_KEY is not set. Please provide a valid API key.")
|
15 |
+
|
16 |
|
17 |
# Initialize the GROQ client with the fetched API key
|
18 |
groq_client = Groq(api_key=groq_api_key)
|