Text Classification
Transformers
PyTorch
Safetensors
English
bert
Trained with AutoTrain
text-embeddings-inference
Instructions to use Showroom/gender_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Showroom/gender_classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Showroom/gender_classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Showroom/gender_classifier") model = AutoModelForSequenceClassification.from_pretrained("Showroom/gender_classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Showroom/gender_classifier: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/Showroom/gender_classifier/resolve/main/README.md
- Command line
-
hf download hf://Showroom/gender_classifier/README.md
-
curl -L -o README.md https://huggingface.co/Showroom/gender_classifier/resolve/main/README.md
1.27 kB
| tags: | |
| - autotrain | |
| - text-classification | |
| language: | |
| - en | |
| widget: | |
| - text: "I love AutoTrain" | |
| datasets: | |
| - Showroom/autotrain-data-gender | |
| co2_eq_emissions: | |
| emissions: 2.4524856335943443 | |
| # Model Trained Using AutoTrain | |
| - Problem type: Multi-class Classification | |
| - Model ID: 63465135479 | |
| - CO2 Emissions (in grams): 2.4525 | |
| ## Validation Metrics | |
| - Loss: 0.762 | |
| - Accuracy: 0.736 | |
| - Macro F1: 0.629 | |
| - Micro F1: 0.736 | |
| - Weighted F1: 0.724 | |
| - Macro Precision: 0.699 | |
| - Micro Precision: 0.736 | |
| - Weighted Precision: 0.742 | |
| - Macro Recall: 0.617 | |
| - Micro Recall: 0.736 | |
| - Weighted Recall: 0.736 | |
| ## Usage | |
| You can use cURL to access this model: | |
| ``` | |
| $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/Showroom/autotrain-gender-63465135479 | |
| ``` | |
| Or Python API: | |
| ``` | |
| from transformers import AutoModelForSequenceClassification, AutoTokenizer | |
| model = AutoModelForSequenceClassification.from_pretrained("Showroom/autotrain-gender-63465135479", use_auth_token=True) | |
| tokenizer = AutoTokenizer.from_pretrained("Showroom/autotrain-gender-63465135479", use_auth_token=True) | |
| inputs = tokenizer("I love AutoTrain", return_tensors="pt") | |
| outputs = model(**inputs) | |
| ``` |