Instructions to use Canstralian/CyberAttackDetection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Canstralian/CyberAttackDetection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Canstralian/CyberAttackDetection")# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("Canstralian/CyberAttackDetection", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| import json | |
| from prompts import PROMPTS | |
| def get_prompt(vulnerability_type): | |
| """ | |
| Fetch the prompt for a specific vulnerability type. | |
| """ | |
| return PROMPTS.get(vulnerability_type, "No prompt available for this type.") | |
| def save_results(output, file_name="results.json"): | |
| """ | |
| Save the results to a JSON file. | |
| """ | |
| with open(file_name, "w") as file: | |
| json.dump(output, file, indent=4) | |
| print(f"Results saved to {file_name}") | |