SwatGarg commited on
Commit
422e884
1 Parent(s): 53d1c73

Update generator.py

Browse files
Files changed (1) hide show
  1. generator.py +3 -2
generator.py CHANGED
@@ -3,6 +3,7 @@ from langchain_community.llms import HuggingFaceEndpoint
3
  from pydantic import ValidationError
4
 
5
  secret_token = os.getenv("HUGGINGFACE_API_TOKEN")
 
6
  def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2"):
7
  '''
8
  Load the LLM from the HuggingFace model hub
@@ -13,9 +14,9 @@ def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2"):
13
  '''
14
 
15
  try:
16
-
17
  llm = HuggingFaceEndpoint(
18
- repo_id=hf_repo_id,
19
  model_kwargs={"temperature": 0.2, "max_length": 128}, huggingfacehub_api_token = secret_token
20
  )
21
  return llm
 
3
  from pydantic import ValidationError
4
 
5
  secret_token = os.getenv("HUGGINGFACE_API_TOKEN")
6
+
7
  def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2"):
8
  '''
9
  Load the LLM from the HuggingFace model hub
 
14
  '''
15
 
16
  try:
17
+ repo_id = repo_id
18
  llm = HuggingFaceEndpoint(
19
+ repo_id=repo_id,
20
  model_kwargs={"temperature": 0.2, "max_length": 128}, huggingfacehub_api_token = secret_token
21
  )
22
  return llm