'I have found this issue when I use Camel tools `sentiment analyzer`? how can i solve it

I'm trying to make sentiment analysis in the Arabic Language using camel_tools, you can check the cell on google colab by clicking this link,

from camel_tools.sentiment import SentimentAnalyzer

sa = SentimentAnalyzer.pretrained()

sentences = [
    'أنا بخير',
    'أنا لست بخير'
]

sentiments = sa.predict(sentences)

print(sentiments)

when I execute the SentimentAnalyzer cell, it shows this error below, please help

---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py in _get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
    608                 use_auth_token=use_auth_token,
--> 609                 user_agent=user_agent,
    610             )

8 frames

ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.


During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)

/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py in _get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
    633         except ValueError:
    634             raise EnvironmentError(
--> 635                 f"We couldn't connect to '{HUGGINGFACE_CO_RESOLVE_ENDPOINT}' to load this model, couldn't find it in the cached "
    636                 f"files and it looks like {pretrained_model_name_or_path} is not the path to a directory containing a "
    637                 f"{configuration_file} file.\nCheckout your internet connection or see how to run the library in "

OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like /root/.camel_tools/data/sentiment_analysis/arabert is not the path to a directory containing a config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source