malmarjeh/t5-arabic-text-summarization

Model

An Arabic abstractive text summarization model

14

15 commits

1 linked in READMEs

updated Jul 1, 2023

See the code

README

An Arabic abstractive text summarization model

A fine-tuned AraT5 model on a dataset of 84,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows:

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
from arabert.preprocess import ArabertPreprocessor

model_name="malmarjeh/t5-arabic-text-summarization"
preprocessor = ArabertPreprocessor(model_name="")

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
pipeline = pipeline("text2text-generation",model=model,tokenizer=tokenizer)

text = "شهدت مدينة طرابلس، مساء أمس الأربعاء، احتجاجات شعبية وأعمال شغب لليوم الثالث على التوالي، وذلك بسبب تردي الوضع المعيشي والاقتصادي. واندلعت مواجهات عنيفة وعمليات كر وفر ما بين الجيش اللبناني والمحتجين استمرت لساعات، إثر محاولة فتح الطرقات المقطوعة، ما أدى إلى إصابة العشرات من الطرفين."
text = preprocessor.preprocess(text)

result = pipeline(text,
            pad_token_id=tokenizer.eos_token_id,
            num_beams=3,
            repetition_penalty=3.0,
            max_length=200,
            length_penalty=1.0,
            no_repeat_ngram_size = 3)[0]['generated_text']
result
>>> 'مواجهات عنيفة بين الجيش اللبناني ومحتجين في طرابلس'

Contact:

banimarje@gmail.com

Arabic News Title Generation
Arabic Paraphrasing
Arabic T5
Arabic Text Summarization
endpoints_compatible
pytorch
t5
T5
text2text-generation
text-generation-inference
transformers

malmarjeh/t5-arabic-text-summarization

Model

An Arabic abstractive text summarization model

14

15 commits

1 linked in READMEs

updated Jul 1, 2023

See the code

README

An Arabic abstractive text summarization model

A fine-tuned AraT5 model on a dataset of 84,764 paragraph-summary pairs.

Paper: Arabic abstractive text summarization using RNN-based and transformer-based architectures.

Dataset: link.

The model can be used as follows:

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
from arabert.preprocess import ArabertPreprocessor

model_name="malmarjeh/t5-arabic-text-summarization"
preprocessor = ArabertPreprocessor(model_name="")

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
pipeline = pipeline("text2text-generation",model=model,tokenizer=tokenizer)

text = "شهدت مدينة طرابلس، مساء أمس الأربعاء، احتجاجات شعبية وأعمال شغب لليوم الثالث على التوالي، وذلك بسبب تردي الوضع المعيشي والاقتصادي. واندلعت مواجهات عنيفة وعمليات كر وفر ما بين الجيش اللبناني والمحتجين استمرت لساعات، إثر محاولة فتح الطرقات المقطوعة، ما أدى إلى إصابة العشرات من الطرفين."
text = preprocessor.preprocess(text)

result = pipeline(text,
            pad_token_id=tokenizer.eos_token_id,
            num_beams=3,
            repetition_penalty=3.0,
            max_length=200,
            length_penalty=1.0,
            no_repeat_ngram_size = 3)[0]['generated_text']
result
>>> 'مواجهات عنيفة بين الجيش اللبناني ومحتجين في طرابلس'

Contact:

banimarje@gmail.com

Arabic News Title Generation
Arabic Paraphrasing
Arabic T5
Arabic Text Summarization
endpoints_compatible
pytorch
t5
T5
text2text-generation
text-generation-inference
transformers