| | --- |
| | license: mit |
| | language: |
| | - en |
| | metrics: |
| | - accuracy 97% |
| | base_model: |
| | - distilbert/distilbert-base-uncased |
| | pipeline_tag: text-classification |
| | --- |
| | # First Name Classification Model |
| | [](https://nowpayments.io/donation/Vishodi) |
| |
|
| | A Transformer-based classifier that checks if a provided first name is likely to be **real** (LABEL_1) or **fake** (LABEL_0). This can be helpful in validating contact form submissions, preventing bot entries, or for general name classification tasks. |
| |
|
| | ## Table of Contents |
| | - [Project Structure](#project-structure) |
| | - [Installation](#installation) |
| | - [Usage](#usage) |
| | - [Support Me](#support-me) |
| | - [License](#license) |
| |
|
| | ## Project Structure |
| | ```plaintext |
| | First_Name_Prediction/ |
| | βββ .gitattributes |
| | βββ README.md |
| | βββ config.json |
| | βββ model.safetensors |
| | βββ requirements.txt |
| | βββ special_tokens_map.json |
| | βββ tokenizer.json |
| | βββ tokenizer_config.json |
| | βββ vocab.txt |
| | ``` |
| |
|
| | ## Installation |
| | 1. **Clone the Repository:** |
| | ```bash |
| | git clone https://github.com/Vishodi/First-Name-Classification.git |
| | ``` |
| |
|
| | 2. **Set Up the Environment:** |
| | Install the required packages using pip: |
| | ```bash |
| | pip install -r requirements.txt |
| | ``` |
| |
|
| | ## Usage |
| | ```python |
| | from transformers import pipeline |
| | |
| | # Replace with your model repository |
| | model_dir = "vishodi/First-Name-Classification" |
| | |
| | # Load the model pipeline with authentication |
| | classifier = pipeline( |
| | "text-classification", |
| | model=model_dir, |
| | tokenizer=model_dir, |
| | ) |
| | |
| | # Test the model |
| | test_names = ["Mark", "vcbcvb", "uhyhu", "elon"] |
| | for name in test_names: |
| | result = classifier(name) |
| | label = result[0]['label'] |
| | score = result[0]['score'] |
| | print(f"Name: {name} => Prediction: {label}, Score: {score:.4f}") |
| | ``` |
| |
|
| | **Output:** |
| | ``` |
| | Name: Mark => Prediction: LABEL_1, Score: 0.9994 |
| | Name: vcbcvb => Prediction: LABEL_0, Score: 0.9985 |
| | Name: uhyhu => Prediction: LABEL_0, Score: 0.9982 |
| | Name: elon => Prediction: LABEL_1, Score: 0.9987 |
| | ``` |
| | ## Hosted Version |
| | [Signup At](https://dashboard.vishodi.com/signup) |
| | ## Support Us |
| | [](https://nowpayments.io/donation/Vishodi) |
| |
|
| | ## License |
| | This project is licensed under the MIT License. |