Spaces:
Runtime error
Runtime error
Commit
·
f769cbe
1
Parent(s):
402116a
Ran locally
Browse files- generator.py +1 -1
generator.py
CHANGED
@@ -59,7 +59,7 @@ def run_model(input_string, **generator_args):
|
|
59 |
|
60 |
inputs = tokenize([input_string])
|
61 |
|
62 |
-
res =
|
63 |
output = hftokenizer.decode(res[0], skip_special_tokens=True)
|
64 |
output = [item.split("<sep>") for item in output]
|
65 |
output = [o.strip() for o in output[:-1]]
|
|
|
59 |
|
60 |
inputs = tokenize([input_string])
|
61 |
|
62 |
+
res = hfmodel.generate(input_ids=inputs['input_ids'], attention_mask=inputs['attention_mask'], **generator_args)
|
63 |
output = hftokenizer.decode(res[0], skip_special_tokens=True)
|
64 |
output = [item.split("<sep>") for item in output]
|
65 |
output = [o.strip() for o in output[:-1]]
|