Kaushik066 commited on
Commit
04b135b
·
verified ·
1 Parent(s): 5efb5af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- token=os.environ["HUGGINGFACEHUB_API_TOKEN"], #huggingfacehub_api_token=SECRET_TOKEN_HF,
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