Run this model with HF Jobs
Run Kostya165/rubert_emotion_slicer on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Kostya165/rubert_emotion_slicer. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Kostya165/rubert_emotion_slicer on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Kostya165/rubert_emotion_slicer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kostya165/rubert_emotion_slicer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kostya165/rubert_emotion_slicer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Kostya165/rubert_emotion_slicer") model = AutoModelForSequenceClassification.from_pretrained("Kostya165/rubert_emotion_slicer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Kostya165/rubert_emotion_slicer
Рекомендую также попробовать новую модель - Kostya165/rubert_tiny2_russian_emotion_sentiment
Это дообученная версия модели blanchefort/rubert-base-cased-sentiment для анализа эмоций и тональности. Модель распознает пять классов эмоций: агрессия, тревожность, сарказм, позитив и нейтральное состояние.
Детали модели
- Разработчик: Kostya165
- Тип модели: Классификация последовательностей на основе BERT
- Язык: Русский
- Исходная модель: blanchefort/rubert-base-cased-sentiment
Использование
Прямое использование
Модель может быть использована для анализа тональности и распознавания эмоций в текстах на русском языке, таких как сообщения в чатах, комментарии или отзывы.
Неподходящее использование
Модель не предназначена для анализа текстов на других языках или для определения сложных эмоциональных состояний, выходящих за пределы пяти категорий.
Начало работы с моделью
Чтобы загрузить и использовать модель, выполните следующий код:
from transformers import BertTokenizer, BertForSequenceClassification
model_name = "Kostya165/rubert_emotion_slicer"
tokenizer = BertTokenizer.from_pretrained(model_name)
model = BertForSequenceClassification.from_pretrained(model_name)
text = "Мне очень понравилось!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(dim=-1).item()
print(f"Предсказанный класс: {predicted_class}")
- Downloads last month
- 7
Model tree for Kostya165/rubert_emotion_slicer
Base model
blanchefort/rubert-base-cased-sentiment