Instructions to use CyberPeace-Institute/Cybersecurity-Knowledge-Graph with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CyberPeace-Institute/Cybersecurity-Knowledge-Graph with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="CyberPeace-Institute/Cybersecurity-Knowledge-Graph", trust_remote_code=True)# Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("CyberPeace-Institute/Cybersecurity-Knowledge-Graph", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
e56f2e0
1
Parent(s): 7544767
Delete configuration.py
Browse files- configuration.py +0 -16
configuration.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
from transformers import PretrainedConfig
|
| 2 |
-
import torch
|
| 3 |
-
|
| 4 |
-
class CybersecurityKnowledgeGraphConfig(PretrainedConfig):
|
| 5 |
-
|
| 6 |
-
def __init__(
|
| 7 |
-
self,
|
| 8 |
-
event_nugget_model_path : str = "nugget_model_state_dict.pth",
|
| 9 |
-
event_argument_model_path : str = "argument_model_state_dict.pth",
|
| 10 |
-
event_realis_model_path : str = "realis_model_state_dict.pth",
|
| 11 |
-
**kwargs,
|
| 12 |
-
):
|
| 13 |
-
self.event_nugget_model_path = event_nugget_model_path
|
| 14 |
-
self.event_argument_model_path = event_argument_model_path
|
| 15 |
-
self.event_realis_model_path = event_realis_model_path
|
| 16 |
-
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|