Skip to content
lei Wang edited this page Jan 13, 2023 · 1 revision
import torch
from NeuroPredPLM.predict import predict
data = [
    ("peptide_1", "IGLRLPNMLKF"),
    ("peptide_2", "QAAQFKVWSASELVD"),
    ("peptide_3","LRSPKMMHKSGCFGRRLDRIGSLSGLGCNVLRKY")
]

device = "cuda" if torch.cuda.is_available() else "cpu" 
neuropeptide_pred = predict(data,device)
# {peptide_id:[Type:int(1->neuropeptide,0->non-neuropeptide), attention score:nd.array]}
Clone this wiki locally