FileNotFoundError: [Errno 2] No such file or directory: 'java': Using a model as an argument for a preprocessing function for text classification with BERT

Hello everyone,

I’m working on a text classifier using AraBERT. My application is working locally however it’s not working in deployment because of the model’s text pre-processing function that uses AraBERT as an rgument like the following:

from arabert.preprocess import ArabertPreprocessor

model_name = "aubmindlab/bert-base-arabertv2"
arabert_prep = ArabertPreprocessor(model_name=model_name)

text = "ولن نبالغ إذا قلنا: إن 'هاتف' أو 'كمبيوتر المكتب' في زمننا هذا ضروري"

The model name doesn’t seem to be recognized as an argiment, and I thought of having it in requiremnets.txt like I would do with a spacy language model like the following:

fr-core-news-lg @

But I’m not sure of the link to place in there.

Error message:

FileNotFoundError: [Errno 2] No such file or directory: 'java'

Do you have any ideas on how to solve this problem?
Thank you so much in advance.

The solution was to provide a default-jre in packages.txt.
It was not a model related problem.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.