Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,13 @@ from sentence_transformers import SentenceTransformer, util
|
|
| 4 |
from groq import Groq
|
| 5 |
from PyPDF2 import PdfReader
|
| 6 |
|
|
|
|
|
|
|
| 7 |
# Initialize the retriever and Groq client
|
| 8 |
retriever = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
|
| 9 |
-
client = Groq(api_key=groq_api) # Replace with your actual Groq API key
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Knowledge base (documents) and embeddings
|
| 12 |
documents = [
|
|
|
|
| 4 |
from groq import Groq
|
| 5 |
from PyPDF2 import PdfReader
|
| 6 |
|
| 7 |
+
|
| 8 |
+
|
| 9 |
# Initialize the retriever and Groq client
|
| 10 |
retriever = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
|
| 11 |
+
# client = Groq(api_key=groq_api) # Replace with your actual Groq API key
|
| 12 |
+
key = os.getenv("groq_api")
|
| 13 |
+
client = Groq(api_key = key)
|
| 14 |
|
| 15 |
# Knowledge base (documents) and embeddings
|
| 16 |
documents = [
|