Spaces:
Runtime error
Runtime error
Update generator.py
Browse files- 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,
|
|
|
|
|
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)
|