File size: 2,190 Bytes
68f79cf
 
 
 
 
52d3eb4
68f79cf
 
 
2c4fd17
6c43ad1
 
2c4fd17
6c43ad1
2c4fd17
 
6c43ad1
2c4fd17
 
 
 
 
912df6a
6c43ad1
912df6a
 
 
 
 
 
 
 
 
 
 
 
2c4fd17
 
6c43ad1
 
 
2c4fd17
 
 
6c43ad1
 
 
2c4fd17
 
d6f09a9
b1a26c2
 
6c43ad1
 
b1a26c2
6c43ad1
b1a26c2
 
 
 
 
 
 
19d37cc
b1a26c2
 
 
 
 
 
6c43ad1
 
 
b1a26c2
 
 
 
 
2c4fd17
0e95a73
 
2c4fd17
 
00c3f2e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
license: mit
language:
- en
metrics:
- accuracy 97.9%
base_model:
- distilbert/distilbert-base-uncased
pipeline_tag: text-classification
---
# Last Name Classification Model
[![Support](https://img.shields.io/badge/Support-Us-brightgreen)](https://nowpayments.io/donation/Vishodi)

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.

## Table of Contents
- [Project Structure](#project-structure)
- [Installation](#installation)
- [Usage](#usage)
- [Support Me](#support-me)
- [License](#license)

## Project Structure
```plaintext
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
git clone https://github.com/Vishodi/Last-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/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}")
```

**Output:**
```
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
```

## Support Us
[![Support Us](https://img.shields.io/badge/Support-Us-brightgreen)](https://nowpayments.io/donation/Vishodi)

## License
This project is licensed under the MIT License.