Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -94,12 +94,19 @@ with st.sidebar:
|
|
94 |
"Select a model to make inference",
|
95 |
('Prot', 'CrossLoss', 'NoTarget'))
|
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(
|
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}")
|
|
|
94 |
"Select a model to make inference",
|
95 |
('Prot', 'CrossLoss', 'NoTarget'))
|
96 |
|
97 |
+
molecule_num = st.number_input('Number of molecules to generate', min_value=1, max_value=100_000, value=1000, step=1)
|
98 |
+
|
99 |
submitted = st.form_submit_button("Start Computing")
|
100 |
|
101 |
|
102 |
if submitted:
|
103 |
+
|
104 |
+
config = model_configs[model_name]
|
105 |
+
|
106 |
+
config.inference_sample_num = molecule_num
|
107 |
+
|
108 |
with st.spinner(f'Creating the trainer class instance for {model_name}...'):
|
109 |
+
trainer = Trainer(config)
|
110 |
with st.spinner(f'Running inference function of {model_name} (this may take a while) ...'):
|
111 |
trainer.inference()
|
112 |
st.success(f"Success with the inference of {model_name}")
|