Instructions to use hadiaskari98/Vulnerability_NER_prod with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hadiaskari98/Vulnerability_NER_prod with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="hadiaskari98/Vulnerability_NER_prod")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("hadiaskari98/Vulnerability_NER_prod") model = AutoModelForTokenClassification.from_pretrained("hadiaskari98/Vulnerability_NER_prod", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,13 +11,18 @@ library_name: transformers
|
|
| 11 |
|
| 12 |
**How to use**
|
| 13 |
|
|
|
|
|
|
|
| 14 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 15 |
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained("hadiaskari98/VULNERABILITY_NER_Fixed")
|
| 17 |
model = AutoModelForTokenClassification.from_pretrained("hadiaskari98/VULNERABILITY_NER_Fixed")
|
| 18 |
|
| 19 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
|
|
|
| 20 |
example = "This is an example of a SQL Injection attack"
|
| 21 |
|
| 22 |
ner_results = nlp(example)
|
| 23 |
print(ner_results)
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
**How to use**
|
| 13 |
|
| 14 |
+
|
| 15 |
+
'''
|
| 16 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 17 |
|
| 18 |
tokenizer = AutoTokenizer.from_pretrained("hadiaskari98/VULNERABILITY_NER_Fixed")
|
| 19 |
model = AutoModelForTokenClassification.from_pretrained("hadiaskari98/VULNERABILITY_NER_Fixed")
|
| 20 |
|
| 21 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 22 |
+
|
| 23 |
example = "This is an example of a SQL Injection attack"
|
| 24 |
|
| 25 |
ner_results = nlp(example)
|
| 26 |
print(ner_results)
|
| 27 |
+
|
| 28 |
+
'''
|