Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ MISTRAL_MODEL1 = 'mistralai/Mixtral-8x7B-Instruct-v0.1'
|
|
18 |
HF_MODEL1 = 'HuggingFaceH4/zephyr-7b-beta'
|
19 |
# define paths
|
20 |
vector_path = 'faiss_index'
|
|
|
21 |
|
22 |
# Initialize your embedding model
|
23 |
embedding_model = HuggingFaceEmbeddings(model_name=EMB_MODEL1)
|
@@ -42,8 +43,8 @@ def respond(
|
|
42 |
|
43 |
# initialse chatbot llm
|
44 |
llm = HuggingFaceHub(
|
45 |
-
repo_id=MISTRAL_MODEL1,
|
46 |
-
|
47 |
model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens}
|
48 |
)
|
49 |
# create a RAG pipeline
|
|
|
18 |
HF_MODEL1 = 'HuggingFaceH4/zephyr-7b-beta'
|
19 |
# define paths
|
20 |
vector_path = 'faiss_index'
|
21 |
+
hf_token = os.environ["HUGGINGFACEHUB_API_TOKEN"]
|
22 |
|
23 |
# Initialize your embedding model
|
24 |
embedding_model = HuggingFaceEmbeddings(model_name=EMB_MODEL1)
|
|
|
43 |
|
44 |
# initialse chatbot llm
|
45 |
llm = HuggingFaceHub(
|
46 |
+
repo_id=MISTRAL_MODEL1,
|
47 |
+
huggingfacehub_api_token=hf_token,
|
48 |
model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens}
|
49 |
)
|
50 |
# create a RAG pipeline
|