Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,9 @@ class ChatConfig:
|
|
15 |
DEFAULT_TEMP = 0.3
|
16 |
DEFAULT_TOP_P = 0.95
|
17 |
|
18 |
-
|
|
|
|
|
19 |
embed_model = SentenceTransformer("all-MiniLM-L6-v2") # Lightweight embedding model
|
20 |
vector_dim = 384 # Embedding size
|
21 |
index = faiss.IndexFlatL2(vector_dim) # FAISS index
|
|
|
15 |
DEFAULT_TEMP = 0.3
|
16 |
DEFAULT_TOP_P = 0.95
|
17 |
|
18 |
+
HF_TOKEN = os.getenv("HF_TOKEN") # Fetch from environment variables
|
19 |
+
|
20 |
+
client = InferenceClient(ChatConfig.MODEL, token=HF_TOKEN)
|
21 |
embed_model = SentenceTransformer("all-MiniLM-L6-v2") # Lightweight embedding model
|
22 |
vector_dim = 384 # Embedding size
|
23 |
index = faiss.IndexFlatL2(vector_dim) # FAISS index
|