Spaces:
Build error
Build error
eikoenchine
commited on
Commit
•
03ffb05
1
Parent(s):
156061c
Upload hello.py
Browse files
hello.py
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from rdkit.Chem import MACCSkeys
|
3 |
+
from rdkit import Chem
|
4 |
+
import numpy as np
|
5 |
+
import pandas as pd
|
6 |
+
import xgboost as xgb
|
7 |
+
# import torch
|
8 |
+
# import torch.nn as nn
|
9 |
+
# import torch.nn.functional as F
|
10 |
+
# from torch.autograd import Variable
|
11 |
+
# from torch.utils.data import Dataset
|
12 |
+
# import torch.utils.data
|
13 |
+
# from torch_geometric.data import DataLoader
|
14 |
+
# from torch_geometric.data import Data
|
15 |
+
|
16 |
+
# from torch_geometric.nn import GATConv, RGCNConv, GCNConv, global_add_pool, global_mean_pool, global_max_pool, GlobalAttention, Set2Set
|
17 |
+
from sklearn.metrics import f1_score, accuracy_score, average_precision_score, roc_auc_score
|
18 |
+
|
19 |
+
import rdkit
|
20 |
+
from rdkit.Chem.Scaffolds import MurckoScaffold
|
21 |
+
|
22 |
+
# from itertools import compress
|
23 |
+
# import random
|
24 |
+
# from collections import defaultdict
|
25 |
+
import pickle
|
26 |
+
device = 'cpu'
|
27 |
+
model_path = 'model/'
|
28 |
+
|
29 |
+
st.set_page_config(
|
30 |
+
page_title='Hello'
|
31 |
+
)
|
32 |
+
st.write('# JAK inhibiition prediction app')
|
33 |
+
st.sidebar.success('Select a page above')
|
34 |
+
|
35 |
+
st.markdown(
|
36 |
+
"""
|
37 |
+
* This is an open-source app framework built specifically for JAK inhibition of a certain drug with its SMILES as input.
|
38 |
+
* Suitable model(s) could be chosen for prediction based on your need (in JAK page).
|
39 |
+
* Simple machine learning models, tree models, graph-based models and bert models are trained ane evaluated (results in Model Evaluation page).
|
40 |
+
* Area uder the curve could also be drawn based on our test set results (in Plot AUC page).
|
41 |
+
Prediction should be used with caution and just for reference.
|
42 |
+
""")
|