SwatGarg commited on
Commit
d9f3c04
1 Parent(s): 4fd7557

Update generator.py

Browse files
Files changed (1) hide show
  1. generator.py +3 -1
generator.py CHANGED
@@ -14,7 +14,9 @@ def load_llm(repo_id="mistralai/Mistral-7B-Instruct-v0.2", token=os.getenv("HUGG
14
  try:
15
  api_token = os.getenv("HUGGINGFACE_API_TOKEN")
16
  llm = HuggingFaceEndpoint(
17
- repo_id=repo_id, max_length=128, temperature=0.2, token=api_token)
 
 
18
  return llm
19
  except ValidationError as e:
20
  print("Validation Error:", e)
 
14
  try:
15
  api_token = os.getenv("HUGGINGFACE_API_TOKEN")
16
  llm = HuggingFaceEndpoint(
17
+ repo_id=repo_id,temperature=0.2,
18
+ model_kwargs={"max_length": 128, "api_token": api_token}
19
+ )
20
  return llm
21
  except ValidationError as e:
22
  print("Validation Error:", e)