Review
Fuente del modelo
- Tipo
- Embedding
- Tamaño del archivo
- 255 MB
- Actualizado
- 14 sept 2026
- Publicador
- @AquilaX-AI
Extracto de la fuente
Artefactos del modelo
1 artefacto
Artefactos del modelo
1 artefactomodel.safetensors
safetensors · 255 MB · SHA-256 5ba1525bf477…6c88
Extractos de fuentes
3 extractos
Extractos de fuentes
3 extractos--- library_name: transformers license: apache-2.0 --- ## Inference ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import time import torch device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") model = AutoModelForSequenceClassification.from_pretrained("AquilaX-AI/Review").to(device) tokenizer = AutoTokenizer.from_pretrained("AquilaX-AI/Review") partial_code = "if (userInput.length > 255) { return; }" # Example snippet of insecure code cwe_id = "CWE-22" # Example CWE ID for Path Traversal cwe_name = "Improper Limitation of a Pathname to a Restricted Directory" # Example CWE Name affected_line = "42" # Example line number in the code file file_name = "utils/inputValidator.js" # Example file name org_id = "12345" # Example organization ID start = time.time() prompt = f"""partial_code: {partial_code} , cwe_id: {cwe_id} , cwe_name: {cwe_name}, affected_line: {affected_line},file_name: {file_name}, org_id: {org_id}""" inputs = tokenizer(prompt, return_tensors="pt").to(device) with torch.no_grad(): logits = model(**inputs).logits predicted_class_id = logits.argmax().item() predicted_class = model.config.id2label[predicted_class_id] print(predicted_class) print(time.time() - start) ```
Source context: 61 downloads · 1 likes · Pipeline text-classification · Library transformers · Repo AquilaX-AI/Review
Source context: 92 downloads · 0 likes · Pipeline text-classification · Library transformers · Repo AquilaX-AI/Review
