Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ tokenizer = AutoTokenizer.from_pretrained("VietAI/vit5-large-vietnews-summarizat
|
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-large-vietnews-summarization")
|
7 |
|
8 |
def preprocess(inp):
|
9 |
-
text = "
|
10 |
features = tokenizer(text, return_tensors="pt")
|
11 |
return features['input_ids'], features['attention_mask']
|
12 |
def predict(input_ids, attention_mask):
|
|
|
6 |
model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-large-vietnews-summarization")
|
7 |
|
8 |
def preprocess(inp):
|
9 |
+
text = "vietnews: " + inp + " </s>"
|
10 |
features = tokenizer(text, return_tensors="pt")
|
11 |
return features['input_ids'], features['attention_mask']
|
12 |
def predict(input_ids, attention_mask):
|