abdulmatinomotoso commited on
Commit
174033e
1 Parent(s): 626a615

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -20,7 +20,6 @@ def clean_text(url):
20
  "ascii"
21
  ) # remove non-ascii, Chinese characters
22
 
23
- text = re.sub('(by[\s\w,|]+ - \d\d\/\d\d\/\d\d\s\d+:\d+\s\w{2}\s\w{2})|(by[\s\w|,]+\d\d,\s\d{4})', "", text)
24
  text = re.sub(r"\n", " ", text)
25
  text = re.sub(r"\n\n", " ", text)
26
  text = re.sub(r"\t", " ", text)
@@ -37,7 +36,7 @@ from transformers import (
37
  )
38
 
39
  #initializing the tokenizer and the model
40
- model_type_2 ="chinhon/pegasus-newsroom-headline_writer"
41
  tokenizer_2 = AutoTokenizer.from_pretrained(model_type_2)
42
  model_2 = AutoModelForSeq2SeqLM.from_pretrained(model_type_2)
43
 
 
20
  "ascii"
21
  ) # remove non-ascii, Chinese characters
22
 
 
23
  text = re.sub(r"\n", " ", text)
24
  text = re.sub(r"\n\n", " ", text)
25
  text = re.sub(r"\t", " ", text)
 
36
  )
37
 
38
  #initializing the tokenizer and the model
39
+ model_type_2 ="chinhon/pegasus-multi_news-headline"
40
  tokenizer_2 = AutoTokenizer.from_pretrained(model_type_2)
41
  model_2 = AutoModelForSeq2SeqLM.from_pretrained(model_type_2)
42