Text Classification
Scikit-learn
Joblib
sentence-transformers
English
sentiment-analysis
imdb
movie-reviews
logistic-regression
Instructions to use abir71/imdb-sentiment-mpnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use abir71/imdb-sentiment-mpnet with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("abir71/imdb-sentiment-mpnet", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - sentence-transformers
How to use abir71/imdb-sentiment-mpnet with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("abir71/imdb-sentiment-mpnet") 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 metadata.json from abir71/imdb-sentiment-mpnet: direct link, hf CLI and curl.
- Browser
- Download file 730 Bytes
-
https://huggingface.co/abir71/imdb-sentiment-mpnet/resolve/main/metadata.json
- Command line
-
hf download hf://abir71/imdb-sentiment-mpnet/metadata.json
-
curl -L -o metadata.json https://huggingface.co/abir71/imdb-sentiment-mpnet/resolve/main/metadata.json
730 Bytes
| { | |
| "embedding_model": "sentence-transformers/all-mpnet-base-v2", | |
| "pooling": "mean", | |
| "normalized": false, | |
| "max_length": 512, | |
| "preprocessing": "strip HTML tags, lower-case", | |
| "labels": { | |
| "0": "negative", | |
| "1": "positive" | |
| }, | |
| "deployed_classifier": "logistic_regression", | |
| "test": { | |
| "logistic_regression": { | |
| "C": 10.0, | |
| "accuracy": 0.9111, | |
| "precision": 0.9039, | |
| "recall": 0.9206, | |
| "f1": 0.9122, | |
| "roc_auc": 0.9694 | |
| }, | |
| "mlp_256": { | |
| "accuracy": 0.9114, | |
| "precision": 0.9065, | |
| "recall": 0.918, | |
| "f1": 0.9122, | |
| "roc_auc": 0.9707 | |
| } | |
| }, | |
| "data": { | |
| "reviews": 50000, | |
| "duplicates_removed": 419, | |
| "train": 39664, | |
| "test": 9917 | |
| } | |
| } |