razent commited on
Commit
58d943c
·
1 Parent(s): f769ccc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = "summarize: " + inp + " </s>"
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):