Text Classification
setfit
Safetensors
sentence-transformers
roberta
generated_from_setfit_trainer
text-embeddings-inference
Instructions to use adriansanz/sentimentv2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use adriansanz/sentimentv2 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("adriansanz/sentimentv2") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use adriansanz/sentimentv2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("adriansanz/sentimentv2") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from adriansanz/sentimentv2: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/adriansanz/sentimentv2/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://adriansanz/sentimentv2/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/adriansanz/sentimentv2/resolve/main/tokenizer_config.json
1.94 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<mask>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "430": { | |
| "content": "@usuario", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "27394": { | |
| "content": "url", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "30000": { | |
| "content": "hashtag", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "30001": { | |
| "content": "emoji", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| } | |
| }, | |
| "bos_token": "<s>", | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": "<s>", | |
| "eos_token": "</s>", | |
| "mask_token": "<mask>", | |
| "max_length": 128, | |
| "model_max_length": 128, | |
| "pad_token": "<pad>", | |
| "sep_token": "</s>", | |
| "stride": 0, | |
| "tokenizer_class": "PreTrainedTokenizerFast", | |
| "truncation_side": "right", | |
| "truncation_strategy": "longest_first", | |
| "unk_token": "<unk>" | |
| } | |