Views
No views yet
1import requests
2from transformers import AutoProcessor, pipeline
3
4phish_processor = AutoProcessor.from_pretrained(
5 "pogzyb/markuplm-phish", trust_remote_code=True
6)
7phish_pipeline = pipeline(
8 "text-classification",
9 model="pogzyb/markuplm-phish",
10 tokenizer=phish_processor,
11 max_length=512,
12 padding="max_length",
13 truncation=True,
14)
15html_string = requests.get("https://huggingface.co").text
16phish_pipeline(html_string)[{'label': 'negative', 'score': 0.9991624355316162}]