Commit
·
cb24644
1
Parent(s):
e718166
Update handler.py
Browse files- handler.py +1 -2
handler.py
CHANGED
@@ -16,10 +16,9 @@ class EndpointHandler:
|
|
16 |
def __call__(self, data: Dict[str, Any]) -> [str]:
|
17 |
inputs = data.pop("inputs", data)
|
18 |
generation_config = GenerationConfig(
|
19 |
-
max_length=1024,
|
20 |
max_new_tokens=250, do_sample=True, top_k=50,
|
21 |
temperature=0.8, pad_token_id=2, num_return_sequences=1,
|
22 |
-
min_new_tokens=
|
23 |
)
|
24 |
|
25 |
output = self.pipeline(inputs, **generation_config.to_dict())
|
|
|
16 |
def __call__(self, data: Dict[str, Any]) -> [str]:
|
17 |
inputs = data.pop("inputs", data)
|
18 |
generation_config = GenerationConfig(
|
|
|
19 |
max_new_tokens=250, do_sample=True, top_k=50,
|
20 |
temperature=0.8, pad_token_id=2, num_return_sequences=1,
|
21 |
+
min_new_tokens=60, repetition_penalty=1.2, return_full_text=False
|
22 |
)
|
23 |
|
24 |
output = self.pipeline(inputs, **generation_config.to_dict())
|