Views
No views yet
1from transformers import pipeline
2from arabert.preprocess import ArabertPreprocessor
3
4processor = ArabertPreprocessor(model="aubmindlab/araelectra-base-discriminator")
5pipe = pipeline("sentiment-analysis", model = "aubmindlab/aragpt2-mega-detector-long")
6
7text = " "
8text_prep = processor.preprocess(text)
9result = pipe(text_prep)
10# [{'label': 'machine-generated', 'score': 0.9977743625640869}]@misc{antoun2020aragpt2,
title={AraGPT2: Pre-Trained Transformer for Arabic Language Generation},
author={Wissam Antoun and Fady Baly and Hazem Hajj},
year={2020},
eprint={2012.15520},
archivePrefix={arXiv},
primaryClass={cs.CL}
}