TypeError: 'ArabertPreprocessor' object is not callable #188
-
I'm trying to run a piece of code from a Hugging Face project, the code is from transformers import ElectraForQuestionAnswering, ElectraForSequenceClassification, AutoTokenizer, pipeline
from preprocess import ArabertPreprocessor
prep_object = ArabertPreprocessor("araelectra-base-discriminator")
question = prep_object('ما هي جامعة الدول العربية ؟') However I'm always faced with the error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey, yes because that sentence in particular doesn't require any changes. Try
The output should be:
I also noticed that you are cloning the repository then importing it should be easier to just |
Beta Was this translation helpful? Give feedback.
Hey, yes because that sentence in particular doesn't require any changes. Try
The output should be:
I also noticed that you are cloning the repository then importing it should be easier to just
pip install arabert
thenfrom arabert import ArabertPreprocessor