Spaces:
Sleeping
Sleeping
added api key
Browse files
app.py
CHANGED
|
@@ -6,13 +6,11 @@ import numpy as np
|
|
| 6 |
import faiss
|
| 7 |
from groq import Groq
|
| 8 |
|
| 9 |
-
# Load API key from environment variable
|
| 10 |
-
api_key = os.getenv("GROQ_API_KEY")
|
| 11 |
-
if not api_key:
|
| 12 |
-
raise ValueError("❌ GROQ_API_KEY environment variable not set.")
|
| 13 |
-
|
| 14 |
# Initialize Groq client
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
model = "llama3-8b-8192"
|
| 17 |
|
| 18 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|
|
|
|
| 6 |
import faiss
|
| 7 |
from groq import Groq
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Initialize Groq client
|
| 10 |
+
key = os.getenv("GROQ_API_KEY")
|
| 11 |
+
if not key:
|
| 12 |
+
raise ValueError("No API key found")
|
| 13 |
+
groq_client = Groq(api_key=key)
|
| 14 |
model = "llama3-8b-8192"
|
| 15 |
|
| 16 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|