Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
from arabert.preprocess import ArabertPreprocessor | |
processor = ArabertPreprocessor(model="aubmindlab/araelectra-base-discriminator") | |
pipe = pipeline("sentiment-analysis", model = "aubmindlab/aragpt2-mega-detector-long") | |
text = " " | |
text_prep = processor.preprocess(text) | |
result = pipe(text_prep) | |
# [{'label': 'machine-generated', 'score': 0.9977743625640869}] | |