cedricbonhomme commited on
Commit
fc530b2
·
verified ·
1 Parent(s): d5cd435

Model card: pin the revision in the example, drop config._commit_hash (removed in transformers 5.21)

Browse files
Files changed (1) hide show
  1. README.md +3 -4
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
- tokenizer = AutoTokenizer.from_pretrained(model_name)
81
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
 
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)