Spaces:
Runtime error
Runtime error
samariddin
commited on
Commit
·
010f328
1
Parent(s):
0ba4db1
added
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
5 |
WHITESPACE_HANDLER = lambda k: re.sub('\s+', ' ', re.sub('\n+', ' ', k.strip()))
|
6 |
|
7 |
model_name = "csebuetnlp/mT5_multilingual_XLSum"
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
10 |
|
11 |
def generate_summary(text):
|
|
|
5 |
WHITESPACE_HANDLER = lambda k: re.sub('\s+', ' ', re.sub('\n+', ' ', k.strip()))
|
6 |
|
7 |
model_name = "csebuetnlp/mT5_multilingual_XLSum"
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name,use_fast=False)
|
9 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
10 |
|
11 |
def generate_summary(text):
|