Instructions to use mahdin70/unixcoder-code-vulnerability-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mahdin70/unixcoder-code-vulnerability-detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mahdin70/unixcoder-code-vulnerability-detector")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("mahdin70/unixcoder-code-vulnerability-detector") model = AutoModelForSequenceClassification.from_pretrained("mahdin70/unixcoder-code-vulnerability-detector") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -60,7 +60,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
| 60 |
import torch
|
| 61 |
|
| 62 |
# Load the fine-tuned model
|
| 63 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 64 |
model = AutoModelForSequenceClassification.from_pretrained("mahdin70/unixcoder-code-vulnerability-detector")
|
| 65 |
|
| 66 |
# Sample code snippet
|
|
|
|
| 60 |
import torch
|
| 61 |
|
| 62 |
# Load the fine-tuned model
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/unixcoder-base")
|
| 64 |
model = AutoModelForSequenceClassification.from_pretrained("mahdin70/unixcoder-code-vulnerability-detector")
|
| 65 |
|
| 66 |
# Sample code snippet
|