changed messages to the toast ones
Browse files
app.py
CHANGED
@@ -325,6 +325,7 @@ if submit_side or submit_main:
|
|
325 |
batch_size = 250
|
326 |
random_seed = 44
|
327 |
|
|
|
328 |
X, Y, rf_model, vqgae_model, ordering_model = load_data(batch_size)
|
329 |
assert X.shape == (603, 4096)
|
330 |
start_time = time()
|
@@ -358,7 +359,9 @@ if submit_side or submit_main:
|
|
358 |
|
359 |
with st.spinner('Getting unique solutions'):
|
360 |
unique_solutions = list(set(tuple(s) for s in ga_instance.solutions))
|
361 |
-
|
|
|
|
|
362 |
|
363 |
scores = {
|
364 |
"rf_score": [],
|
@@ -399,7 +402,8 @@ if submit_side or submit_main:
|
|
399 |
chosen_ids = chosen_gen.index.to_list()
|
400 |
chosen_solutions = np.array([unique_solutions[ind] for ind in chosen_ids])
|
401 |
gen_frag_inds = frag_counts_to_inds(chosen_solutions, max_atoms=51)
|
402 |
-
st.
|
|
|
403 |
|
404 |
gen_molecules = []
|
405 |
results = {"smiles": [], "ordering_score": [], "validity": []}
|
@@ -451,6 +455,7 @@ if submit_side or submit_main:
|
|
451 |
mins_used = int(round(time_used // 60, 0))
|
452 |
seconds_used = int(round(time_used % 60, 0))
|
453 |
st.success(f'{filtered_gen_stats.shape[0]} valid solutions were obtained in {mins_used} mins {seconds_used} secs')
|
|
|
454 |
|
455 |
st.subheader('Generation results', divider='rainbow')
|
456 |
st.dataframe(filtered_gen_stats)
|
|
|
325 |
batch_size = 250
|
326 |
random_seed = 44
|
327 |
|
328 |
+
st.toast('Optimisation is started. The progress will be printed below')
|
329 |
X, Y, rf_model, vqgae_model, ordering_model = load_data(batch_size)
|
330 |
assert X.shape == (603, 4096)
|
331 |
start_time = time()
|
|
|
359 |
|
360 |
with st.spinner('Getting unique solutions'):
|
361 |
unique_solutions = list(set(tuple(s) for s in ga_instance.solutions))
|
362 |
+
|
363 |
+
st.toast(f'{len(unique_solutions)} latent vectors were obtained')
|
364 |
+
# st.success(f'{len(unique_solutions)} solutions were obtained')
|
365 |
|
366 |
scores = {
|
367 |
"rf_score": [],
|
|
|
402 |
chosen_ids = chosen_gen.index.to_list()
|
403 |
chosen_solutions = np.array([unique_solutions[ind] for ind in chosen_ids])
|
404 |
gen_frag_inds = frag_counts_to_inds(chosen_solutions, max_atoms=51)
|
405 |
+
st.toast(f'The number of chosen latent vectors is {gen_frag_inds.shape[0]}')
|
406 |
+
# st.info(f'The number of chosen solutions is {gen_frag_inds.shape[0]}', icon="ℹ️")
|
407 |
|
408 |
gen_molecules = []
|
409 |
results = {"smiles": [], "ordering_score": [], "validity": []}
|
|
|
455 |
mins_used = int(round(time_used // 60, 0))
|
456 |
seconds_used = int(round(time_used % 60, 0))
|
457 |
st.success(f'{filtered_gen_stats.shape[0]} valid solutions were obtained in {mins_used} mins {seconds_used} secs')
|
458 |
+
st.balloons()
|
459 |
|
460 |
st.subheader('Generation results', divider='rainbow')
|
461 |
st.dataframe(filtered_gen_stats)
|