Izan website
DEEPLEARNING
Deeplearning is a part of machine learnig and is part of artifitial inteligence.
!pip install DeepPurpose
!pip install gradio
!pip install rdkit-pypi
!pip install git+https://github.com/bp-kelley/descriptastorus
!pip install pandas-flavor
import numpy as np
import pandas as pd
from DeepPurpose import utils
from DeepPurpose import DTI as models
import gradio
model_binding = models.model_pretrained(model = 'MPNN_CNN_BindingDB')
model_kiba = models.model_pretrained(model = 'MPNN_CNN_KIBA')
model_davis = models.model_pretrained(model = 'MPNN_CNN_DAVIS')
def DTI_pred(data, drug, target):
if data == 'BindingDB':
model = model_binding
elif data == 'KIBA':
model = model_kiba
elif data == 'DAVIS':
model = model_davis
X_pred = utils.data_process(X_drug = [drug], X_target = [target], y = [0],
drug_encoding = 'MPNN', target_encoding = 'CNN',
split_method='no_split')
y_pred = model.predict(X_pred)
return str(y_pred[0])
gradio.Interface(DTI_pred,
[gradio.inputs.Dropdown(label = "Training Dataset", choices = ['BindingDB', 'DAVIS', 'KIBA']),
gradio.inputs.Textbox(lines = 5, label = "Drug SMILES"),
gradio.inputs.Textbox(lines = 5, label = "Target Amino Acid Sequence")],
gradio.outputs.Textbox(label = "Predicted Affinity")).launch(share=True)