Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def generate_text(input_text):
|
|
27 |
x_token = tokenizer("", prefix_text=input_text, return_tensors="pt")
|
28 |
input_ids = x_token.input_ids.to(device)
|
29 |
token_type_ids = x_token.token_type_ids.to(device)
|
30 |
-
gen_token = model.generate(input_ids, token_type_ids=token_type_ids, max_new_tokens=
|
31 |
output_text = tokenizer.decode(gen_token[0])
|
32 |
return output_text
|
33 |
|
|
|
27 |
x_token = tokenizer("", prefix_text=input_text, return_tensors="pt")
|
28 |
input_ids = x_token.input_ids.to(device)
|
29 |
token_type_ids = x_token.token_type_ids.to(device)
|
30 |
+
gen_token = model.generate(input_ids, token_type_ids=token_type_ids, max_new_tokens=150)
|
31 |
output_text = tokenizer.decode(gen_token[0])
|
32 |
return output_text
|
33 |
|