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 config.json from adriansanz/sentimentv2: direct link, hf CLI and curl.
- Browser
- Download file 911 Bytes
-
https://huggingface.co/adriansanz/sentimentv2/resolve/main/config.json
- Command line
-
hf download hf://adriansanz/sentimentv2/config.json
-
curl -L -o config.json https://huggingface.co/adriansanz/sentimentv2/resolve/main/config.json
911 Bytes
| { | |
| "_name_or_path": "pysentimiento/robertuito-sentiment-analysis", | |
| "architectures": [ | |
| "RobertaModel" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "gradient_checkpointing": false, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "NEG", | |
| "1": "NEU", | |
| "2": "POS" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "NEG": 0, | |
| "NEU": 1, | |
| "POS": 2 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 130, | |
| "model_type": "roberta", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "position_embedding_type": "absolute", | |
| "problem_type": "single_label_classification", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.39.0", | |
| "type_vocab_size": 1, | |
| "use_cache": true, | |
| "vocab_size": 30002 | |
| } | |