-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
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]}