Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- ar
|
5 |
+
tags:
|
6 |
+
- Summarization
|
7 |
+
- Arabic Headline Dataset
|
8 |
+
- AHS
|
9 |
+
- AraBART
|
10 |
+
---
|
11 |
+
# AraBART-AHS
|
12 |
+
|
13 |
+
### Model Description
|
14 |
+
|
15 |
+
**AraBART-AHS** is a fine-tuned version of [AraBART](https://huggingface.co/moussaKam/AraBART) model on [Arabic Headline Dataset (AHS)](https://journalofbigdata.springeropen.com/articles/10.1186/s40537-020-00386-7).
|
16 |
+
|
17 |
+
## Uses
|
18 |
+
|
19 |
+
This model is intended to be used to generate Arabic abstractive summaries in particular headlines of articles.
|
20 |
+
|
21 |
+
### How to Use
|
22 |
+
|
23 |
+
```python
|
24 |
+
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, pipeline
|
25 |
+
|
26 |
+
|
27 |
+
model_name = "benakrab/AraBART-AHS"
|
28 |
+
|
29 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
30 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
31 |
+
|
32 |
+
summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
|
33 |
+
|
34 |
+
|
35 |
+
text = "ينصح بممارسة الكتابة بشكل يومي ، وجعلها روتينا يوميا ؛ و ذلك لتطوير المهارات اللغوية و الكتابية و تحسينها ، إذ إنه كلما كتب الشخص أكثر كلما شعر بتطور أكبر ، و لذلك يجب تخصيص وقت لكتابة فقرة على الأقل ، أو صفحة كاملة يوميا ، و يمكن الاستيقاظ باكرا للكتابة ، أو النوم متأخرا بعد كتابة فقرة ما ، و لو لفترة قصيرة لا تتعدى خمس عشرة دقيقة عند عدم وجود وقت كاف أثناء النهار"
|
36 |
+
|
37 |
+
summary = summarizer(text)[0].get("summary_text")
|
38 |
+
print(summary)
|
39 |
+
|
40 |
+
```
|
41 |
+
|
42 |
+
## Citation
|
43 |
+
```bibtex
|
44 |
+
@inproceedings{Benbarka-2024-arabart-ahs,
|
45 |
+
title = "Fine-Tuning AraBART on AHS dataset for Arabic Abstractive Summarization",
|
46 |
+
author = "Mustapha Benbarka and Moulay Abdellah Kassimi",
|
47 |
+
booktitle = "Proceedings of the Eighth International Conference on Arabic Language Processing",
|
48 |
+
year = "2024",
|
49 |
+
publisher = "Accepted, to be pusblished in CCIS series Springer",
|
50 |
+
}
|
51 |
+
```
|