/home/kubwa/anaconda3/envs/pytorch/lib/python3.11/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
tokenizer_config.json: 100%|██████████| 397/397 [00:00<00:00, 770kB/s]
spm.model: 100%|██████████| 2.46M/2.46M [00:01<00:00, 2.17MB/s]
added_tokens.json: 100%|██████████| 18.0/18.0 [00:00<00:00, 42.5kB/s]
special_tokens_map.json: 100%|██████████| 156/156 [00:00<00:00, 355kB/s]
/home/kubwa/anaconda3/envs/pytorch/lib/python3.11/site-packages/transformers/convert_slow_tokenizer.py:550: UserWarning: The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option which is not implemented in the fast tokenizers. In practice this means that the fast version of the tokenizer can produce unknown tokens whereas the sentencepiece version would have converted these unknown tokens into a sequence of byte tokens matching the original piece of text.
warnings.warn(
config.json: 100%|██████████| 1.03k/1.03k [00:00<00:00, 2.05MB/s]
model.safetensors: 100%|██████████| 1.74G/1.74G [01:29<00:00, 19.4MB/s]
Calssification
aspects = ["camera", "performance", "weight"]
text = """
The camera quality of this phone is amazing; however, it is too heavy for
a smartphone, and due to the next-generation CPUs, it's very fast.
"""
for aspect in aspects:
print(aspect, classifier(text, text_pair=aspect))