Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,16 +13,16 @@ model = AutoModelForSeq2SeqLM.from_pretrained("PhongLT/ViLexNorm-bartpho-syllabl
|
|
13 |
def normalize(input):
|
14 |
input_ids = tokenizer( input,
|
15 |
return_tensors="pt",
|
16 |
-
max_length=
|
17 |
padding="max_length",
|
18 |
truncation= True).input_ids
|
19 |
|
20 |
output_ids = model.generate(input_ids,
|
21 |
-
max_length=
|
22 |
|
23 |
return tokenizer.decode(output_ids[0],
|
24 |
skip_special_tokens=True,
|
25 |
-
max_length=
|
26 |
|
27 |
# Create title, description and article strings
|
28 |
title = "Vietnamese Lexical Normalization"
|
|
|
13 |
def normalize(input):
|
14 |
input_ids = tokenizer( input,
|
15 |
return_tensors="pt",
|
16 |
+
max_length=128,
|
17 |
padding="max_length",
|
18 |
truncation= True).input_ids
|
19 |
|
20 |
output_ids = model.generate(input_ids,
|
21 |
+
max_length=128)
|
22 |
|
23 |
return tokenizer.decode(output_ids[0],
|
24 |
skip_special_tokens=True,
|
25 |
+
max_length=128)
|
26 |
|
27 |
# Create title, description and article strings
|
28 |
title = "Vietnamese Lexical Normalization"
|