Text Classification
Transformers
Safetensors
English
roberta
Generated from Trainer
classification
nlp
vulnerability
Eval Results (legacy)
text-embeddings-inference
Instructions to use CIRCL/vulnerability-severity-classification-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIRCL/vulnerability-severity-classification-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CIRCL/vulnerability-severity-classification-roberta-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base") model = AutoModelForSequenceClassification.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Model card: pin the revision in the example, drop config._commit_hash (removed in transformers 5.21)
Browse files
README.md
CHANGED
|
@@ -77,12 +77,11 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
| 77 |
import torch
|
| 78 |
|
| 79 |
model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
|
| 80 |
-
|
| 81 |
-
|
|
|
|
| 82 |
model.eval()
|
| 83 |
|
| 84 |
-
print("Model revision:", model.config._commit_hash)
|
| 85 |
-
|
| 86 |
test_description = "SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious executable binaries \
|
| 87 |
that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
|
| 88 |
inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
|
|
|
|
| 77 |
import torch
|
| 78 |
|
| 79 |
model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
|
| 80 |
+
revision = "064daa2"
|
| 81 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, revision=revision)
|
| 82 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name, revision=revision)
|
| 83 |
model.eval()
|
| 84 |
|
|
|
|
|
|
|
| 85 |
test_description = "SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious executable binaries \
|
| 86 |
that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
|
| 87 |
inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
|