Spaces:
Sleeping
Sleeping
Upload better_transformer.py
Browse files- better_transformer.py +1 -1
better_transformer.py
CHANGED
@@ -361,7 +361,7 @@ def generate(model, tokenizer, device, method=None, k=None,
|
|
361 |
|
362 |
if cond != "":
|
363 |
|
364 |
-
cond_tokens = tokenizer(cond).input_ids
|
365 |
|
366 |
gen_tokens = model.generate(torch.tensor(cond_tokens).unsqueeze(0).long().to(device),
|
367 |
method=method, k=k, p_nucleus=p_nucleus, temp=temp,
|
|
|
361 |
|
362 |
if cond != "":
|
363 |
|
364 |
+
cond_tokens = tokenizer(cond).input_ids
|
365 |
|
366 |
gen_tokens = model.generate(torch.tensor(cond_tokens).unsqueeze(0).long().to(device),
|
367 |
method=method, k=k, p_nucleus=p_nucleus, temp=temp,
|