c:\Users\ESenn\Miniconda3\envs\llm_class\Lib\site-packages\tqdm\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
%% Cell type:code id: tags:
``` python
# load your data here
```
%% Cell type:markdown id: tags:
# Transformers Library for Sentiment Classification using BERT
%% Cell type:markdown id: tags:
**Task:** Review classification
**Model:** A pretrained BERT model including a sentiment classification head (which is not trained on our task).
We use the hidden states of BERT for Sentiment Classification.
The classifier is not trained. See notebooks for chapter 2 for training, and chapter 5 for a step-by-stey description of how to train it.
%% Cell type:code id: tags:
``` python
# Load pre-trained BERT tokenizer and model for sentiment classification
c:\Users\ESenn\Miniconda3\envs\llm_class\Lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
Text: This movie was fantastic! I loved it.
Sentiment: 5 stars
Text: The food was terrible, I will never come back.