> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vishodi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Locally Name Verification

> Locally Run Classification Model

### Introduction

A Transformer-based classifier that checks if a provided first/last 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.

* accuracy: 97.9%
* model:
  * base: 'distilbert/distilbert-base-uncased'
  * type: 'text-classification'
* license: 'mit'

### First Name Classification Model

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.

### Project Structure

```plaintext theme={null}
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 theme={null}
git clone https://github.com/Vishodi/First-Name-Classification.git
```

2. **Set Up the Environment:**

```bash theme={null}
pip install -r requirements.txt
```

### Usage

```python Python theme={null}
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}")
```

**Example Output:**

```python theme={null}
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
```

## Last Name Classification Model

A Transformer-based classifier that checks if a provided last 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.

### Project Structure

```text theme={null}
Last_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 theme={null}
git clone https://github.com/Vishodi/Last-Name-Classification.git
```

2. **Set Up the Environment:**

```bash theme={null}
pip install -r requirements.txt
```

### Usage

```python Python theme={null}
from transformers import pipeline

# Replace with your model repository
model_dir = "vishodi/Last-Name-Classification"

# Load the model pipeline with authentication
classifier = pipeline(
    "text-classification",
    model=model_dir,
    tokenizer=model_dir,
)

# Test the model
test_names = ["musk", "zzzzzz", "uhyhu", "trump"]
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}")
```

**Example Output:**

```python theme={null}
Name: musk   => Prediction: LABEL_1, Score: 0.9167
Name: zzzzzz => Prediction: LABEL_0, Score: 0.9991
Name: uhyhu  => Prediction: LABEL_0, Score: 0.9944
Name: trump  => Prediction: LABEL_1, Score: 0.9998
```

## License

This project is licensed under the MIT License.
