wylum commited on
Commit
b08de40
·
verified ·
1 Parent(s): 7cbcc0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -90,7 +90,7 @@ user_agent = os.getenv("USER_AGENT")
90
  dr_link_url1 = os.getenv("DR_LINK_1")
91
  dr_link_url2 = os.getenv("DR_LINK_2")
92
  azure_endpt = os.getenv("AZURE_ENDPT")
93
-
94
 
95
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
96
  "google/gemma-7b-it","google/gemma-2b-it", \
@@ -291,6 +291,7 @@ def build_qa_chain(collection_name, vector_db, file: str, llm_option, temperatur
291
  if llm_model == "mistralai/Mixtral-8x7B-Instruct-v0.1":
292
  llm = HuggingFaceEndpoint(
293
  repo_id=llm_model,
 
294
  task=task, # Explicitly specify task
295
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True}
296
  temperature = temperature,
 
90
  dr_link_url1 = os.getenv("DR_LINK_1")
91
  dr_link_url2 = os.getenv("DR_LINK_2")
92
  azure_endpt = os.getenv("AZURE_ENDPT")
93
+ huffingface_read_token = os.getenv("huffingface_read_token")
94
 
95
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
96
  "google/gemma-7b-it","google/gemma-2b-it", \
 
291
  if llm_model == "mistralai/Mixtral-8x7B-Instruct-v0.1":
292
  llm = HuggingFaceEndpoint(
293
  repo_id=llm_model,
294
+ huggingfacehub_api_token = huffingface_read_token,
295
  task=task, # Explicitly specify task
296
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True}
297
  temperature = temperature,