Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,14 +76,27 @@ class NoTargetConfig(DrugGENConfig):
|
|
| 76 |
submodel="NoTarget"
|
| 77 |
inference_model="experiments/models/NoTarget"
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
with st.sidebar:
|
| 80 |
st.title("DrugGEN")
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
# with st.spinner('Setting up the trainer class...'):
|
| 89 |
# trainer = Trainer(ProtConfig())
|
|
@@ -93,5 +106,8 @@ with st.sidebar:
|
|
| 93 |
|
| 94 |
st.title("text")
|
| 95 |
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
| 97 |
|
|
|
|
| 76 |
submodel="NoTarget"
|
| 77 |
inference_model="experiments/models/NoTarget"
|
| 78 |
|
| 79 |
+
|
| 80 |
+
model_configs = {
|
| 81 |
+
"Prot": ProtConfig(),
|
| 82 |
+
"CrossLoss": CrossLossConfig(),
|
| 83 |
+
"NoTarget": NoTargetConfig(),
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
|
| 87 |
with st.sidebar:
|
| 88 |
st.title("DrugGEN")
|
| 89 |
+
with st.form("model_selection_from"):
|
| 90 |
|
| 91 |
+
model_name = st.radio(
|
| 92 |
+
"Select a model to make inference",
|
| 93 |
+
('Prot', 'CrossLoss', 'NoTarget'))
|
| 94 |
|
| 95 |
+
submitted = st.form_submit_button("Start Computing")
|
| 96 |
+
|
| 97 |
+
if submitted:
|
| 98 |
+
|
| 99 |
+
st.write(model_name)
|
| 100 |
|
| 101 |
# with st.spinner('Setting up the trainer class...'):
|
| 102 |
# trainer = Trainer(ProtConfig())
|
|
|
|
| 106 |
|
| 107 |
st.title("text")
|
| 108 |
|
| 109 |
+
if submitted:
|
| 110 |
+
trainer = Trainer(model_configs[model_name])
|
| 111 |
+
trainer.inference()
|
| 112 |
+
st.success(f"Success with the inference of {model_name}")
|
| 113 |
|