Downloads · 30 days
0
RamadhanZome/phish-transformer
phish-transformer is a text classification model from RamadhanZome. Use it when you need a label for a piece of text. The card lists the license as gpl-3.0.
A lightweight, pure-CPU transformer that detects phishing URLs and warns users inside Chrome.
Downloads · 30 days
0
Access
Public
Updated Feb 18, 2026
Repo size
58 MB
Likes
0
Public
Click a slice to open those files.
.csv65.9 MB · 98%
From the Hugging Face model README
A lightweight, pure-CPU transformer that detects phishing URLs and warns users inside Chrome.
Version 1.0 – 2025
Custom Commercial Licence – see LICENSE for terms.
Tested on Python 3.10–3.13
/predict .The model judges only the URL string (characters, sub-domains, TLD, etc.) and does not fetch or inspect page content.
It is designed as a zero-latency first filter against look-alike domains; content-based attacks require additional page-analysis layers.
phish_transformer/
├── datasets/ # UCI CSV + splits
├── models/ # *.pt checkpoints (git-ignored)
├── src/ # modular code
│ ├── data/ # tokenizer + preprocessing
│ ├── model/ # transformer definition
│ ├── training/ # training loop
│ └── inference/ # Flask API + evaluation
├── extension/ # Chrome MV3 extension
├── tests/ # pytest suite
├── main.py # end-to-end pipeline
├── requirements.txt # dependencies
└── README.md # this file
git clone https://github.com/YOU/phish-transformer.git
cd phish-transformer
python -m venv venv
source venv/bin/activate # Windows : venv\Scripts\activate
pip install -r requirements.txt # includes torch, flask, pandas, etc.
# 1. Train & export
python main.py
# 2. Start API
flask --app src/inference/app run --port 8000
# 3. Load extension
Chrome → Extensions → Developer mode → Load unpacked → select extension/
# 4. Test
pytest tests/

POST /predict
Request :
{"url" : "https://example.com"}
Response :
{"phishing" : 0.97}
CLI test
curl -X POST http://127.0.0.1:8000/predict \
-H "Content-Type: application/json" \
-d '{"url" : "https://example.com"}'
GUI testers
| Layer | Value |
|---|---|
| Architecture | 2-layer Transformer encoder |
| Embedding dim | 32 |
| Heads | 2 |
| Feed-forward | 64 |
| Dropout | 0.1 |
| Sequence | 75 chars |
| Vocab | 96 printable ASCII tokens |
| Params | ≈ 45 k |
| Test AUC | ≈ 0.98 |
python src/inference/evaluate.py # produces roc.png
extension/.extension/ folder (must contain manifest.json at top level).fetch() URL in content.js.git checkout -b feat/awesome)This project is licensed under the GNU General Public Licence v3.0 – see LICENSE for details.
Commercial use is allowed only if you open-source your entire derivative under the same licence.