Text Classification
Transformers
PyTorch
Safetensors
English
bert
Trained with AutoTrain
text-embeddings-inference
Run this model with HF Jobs
Run Showroom/gender_classifier 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/Showroom/gender_classifier. 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/Showroom/gender_classifier 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 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
Commit From AutoTrain
Browse filesFiles changed (9)
- .gitattributes+3
- README.mdAdded+56
- config.jsonAdded+42
- model.safetensorsAdded+3
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+13
- vocab.txtAdded
31 unmodified lines32333431 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text31 unmodified lines32333435363731 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.tar.gz filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556---tags:- autotrain- text-classificationlanguage:- enwidget:- text: "I love AutoTrain"datasets:- Showroom/autotrain-data-genderco2_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)```123456789101112131415161718192021222324252627282930313233343536373839404142{ "_name_or_path": "AutoTrain", "_num_labels": 4, "architectures": [ "BertForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "gradient_checkpointing": false, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1024, "id2label": { "0": "gender could not be deduced", "1": "men's", "2": "unisex", "3": "women's" }, "initializer_range": 0.02, "intermediate_size": 4096, "label2id": { "gender could not be deduced": 0, "men's": 1, "unisex": 2, "women's": 3 }, "layer_norm_eps": 1e-12, "max_length": 256, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 16, "num_hidden_layers": 24, "pad_token_id": 0, "padding": "max_length", "position_embedding_type": "absolute", "problem_type": "single_label_classification", "torch_dtype": "float32", "transformers_version": "4.29.2", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30522}123version https://git-lfs.github.com/spec/v1oid sha256:80b49504a48dcde6631b7591360bd9cfc5910e0d577bd4111d13d2096b4cbcd4size 1340635152123version https://git-lfs.github.com/spec/v1oid sha256:809e665af7c080e5422de26618195f471a6b27b50140054b276891cb2713a6b7size 13407228051234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}123version https://git-lfs.github.com/spec/v1oid sha256:0d3aef594edd5f9b53e7f814277a9171dc70ff93eb66bda6e01f7aa53997d963size 71166112345678910111213{ "clean_up_tokenization_spaces": true, "cls_token": "[CLS]", "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 512, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}.gitattributes+3
README.mdAdded+56
config.jsonAdded+42
model.safetensorsAdded+3
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+13
vocab.txtAdded