Spaces:
Running
Running
final touches
Browse files- app.py +12 -9
- experiments/.gitignore +1 -0
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from trainer import Trainer
|
| 3 |
|
| 4 |
-
|
| 5 |
class DrugGENConfig:
|
| 6 |
submodel='CrossLoss'
|
| 7 |
act='relu'
|
|
@@ -85,7 +84,10 @@ model_configs = {
|
|
| 85 |
|
| 86 |
|
| 87 |
with st.sidebar:
|
| 88 |
-
st.title("DrugGEN")
|
|
|
|
|
|
|
|
|
|
| 89 |
with st.form("model_selection_from"):
|
| 90 |
|
| 91 |
model_name = st.radio(
|
|
@@ -94,18 +96,19 @@ with st.sidebar:
|
|
| 94 |
|
| 95 |
submitted = st.form_submit_button("Start Computing")
|
| 96 |
|
| 97 |
-
if submitted:
|
| 98 |
-
|
| 99 |
-
st.write(model_name)
|
| 100 |
-
|
| 101 |
-
|
| 102 |
|
| 103 |
if submitted:
|
| 104 |
-
with st.spinner('Creating the trainer class instance...'):
|
| 105 |
trainer = Trainer(model_configs[model_name])
|
| 106 |
-
with st.spinner('Running inference function (this may take a while) ...'):
|
| 107 |
trainer.inference()
|
| 108 |
st.success(f"Success with the inference of {model_name}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
else:
|
| 110 |
st.warning("Please select a model to make inference")
|
| 111 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from trainer import Trainer
|
| 3 |
|
|
|
|
| 4 |
class DrugGENConfig:
|
| 5 |
submodel='CrossLoss'
|
| 6 |
act='relu'
|
|
|
|
| 84 |
|
| 85 |
|
| 86 |
with st.sidebar:
|
| 87 |
+
st.title("DrugGEN: Target Centric De Novo Design of Drug Candidate Molecules with Graph Generative Deep Adversarial Networks")
|
| 88 |
+
st.write("[](https://arxiv.org/abs/2302.07868) [](https://github.com/HUBioDataLab/DrugGEN)")
|
| 89 |
+
|
| 90 |
+
|
| 91 |
with st.form("model_selection_from"):
|
| 92 |
|
| 93 |
model_name = st.radio(
|
|
|
|
| 96 |
|
| 97 |
submitted = st.form_submit_button("Start Computing")
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
if submitted:
|
| 101 |
+
with st.spinner(f'Creating the trainer class instance for {model_name}...'):
|
| 102 |
trainer = Trainer(model_configs[model_name])
|
| 103 |
+
with st.spinner(f'Running inference function of {model_name} (this may take a while) ...'):
|
| 104 |
trainer.inference()
|
| 105 |
st.success(f"Success with the inference of {model_name}")
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
with open(f'experiments/inference/{model_name}/inference_drugs.txt') as f:
|
| 109 |
+
inference_drugs = f.read()
|
| 110 |
+
st.download_button(label="Click to download generated molecules", data=inference_drugs, file_name=f'{model_name}_inference.smi', mime="text/plain")
|
| 111 |
+
|
| 112 |
else:
|
| 113 |
st.warning("Please select a model to make inference")
|
| 114 |
|
experiments/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
inference/
|