Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,12 +7,13 @@ from docx.shared import Inches
|
|
| 7 |
from io import BytesIO
|
| 8 |
from langchain_huggingface.embeddings import HuggingFaceEmbeddings
|
| 9 |
from langchain.vectorstores import Chroma
|
|
|
|
| 10 |
|
| 11 |
# Updated initialization with model_name
|
| 12 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
| 13 |
|
| 14 |
# Verificar que la clave de API se ha cargado
|
| 15 |
-
api_key=
|
| 16 |
# Inicializar el cliente de Groq
|
| 17 |
client = Groq(api_key=api_key)
|
| 18 |
|
|
|
|
| 7 |
from io import BytesIO
|
| 8 |
from langchain_huggingface.embeddings import HuggingFaceEmbeddings
|
| 9 |
from langchain.vectorstores import Chroma
|
| 10 |
+
import os
|
| 11 |
|
| 12 |
# Updated initialization with model_name
|
| 13 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
| 14 |
|
| 15 |
# Verificar que la clave de API se ha cargado
|
| 16 |
+
api_key= os.environ.get("API_KEY")
|
| 17 |
# Inicializar el cliente de Groq
|
| 18 |
client = Groq(api_key=api_key)
|
| 19 |
|