You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Hello! I'm working in a google colab notebook and find the below error when trying to predict using the RoBERTa pretrained sentiment analysis model:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-9-ad5209ed4732> in <module>()
1 # load sentiment analysis model
2 predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/stanford-sentiment-treebank-roberta.2021-03-11.tar.gz")
----> 3 predictor.predict("a very well-made, funny and entertaining picture.")
3 frames
/usr/local/lib/python3.7/dist-packages/allennlp_models/classification/dataset_readers/stanford_sentiment_tree_bank.py in text_to_instance(self, tokens, sentiment)
113 """
114 assert isinstance(
--> 115 tokens, list
116 ) # If tokens is a str, nothing breaks but the results are garbage, so we check.
117 if self._tokenizer is None:
AssertionError:
Running this code (straight from the documentation) produces the mentioned error:
# load sentiment analysis model
predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/stanford-sentiment-treebank-roberta.2021-03-11.tar.gz")
predictor.predict("a very well-made, funny and entertaining picture.")
The model itself seems to load but the predictions throw an unidentified error. Any help would be much appreciated - thanks so much!
The text was updated successfully, but these errors were encountered:
Hello! I'm working in a google colab notebook and find the below error when trying to predict using the RoBERTa pretrained sentiment analysis model:
My package installation code is:
Running this code (straight from the documentation) produces the mentioned error:
The model itself seems to load but the predictions throw an unidentified error. Any help would be much appreciated - thanks so much!
The text was updated successfully, but these errors were encountered: