ipd commited on
Commit
d2c5c02
1 Parent(s): e04a2b6

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -213,6 +213,7 @@ def generate_canonical(smiles):
213
  latent_vec, mask = encode([selfie])
214
  gen_mol = None
215
  for i in range(5, 51):
 
216
  noise = i / 10
217
  perturbed_latent = perturb_latent(latent_vec, noise_scale=noise)
218
  gen = generate(perturbed_latent, mask)
@@ -221,6 +222,7 @@ def generate_canonical(smiles):
221
 
222
  if gen_mol:
223
  # Calculate properties for ref and gen molecules
 
224
  ref_properties = calculate_properties(smiles)
225
  gen_properties = calculate_properties(gen_mol)
226
  tanimoto_similarity = calculate_tanimoto(smiles, gen_mol)
@@ -235,6 +237,7 @@ def generate_canonical(smiles):
235
  df = pd.DataFrame(data)
236
 
237
  # Display molecule image of canonical smiles
 
238
  mol_image = smiles_to_image(gen_mol)
239
 
240
  return df, gen_mol, mol_image
 
213
  latent_vec, mask = encode([selfie])
214
  gen_mol = None
215
  for i in range(5, 51):
216
+ print("Searching Latent space")
217
  noise = i / 10
218
  perturbed_latent = perturb_latent(latent_vec, noise_scale=noise)
219
  gen = generate(perturbed_latent, mask)
 
222
 
223
  if gen_mol:
224
  # Calculate properties for ref and gen molecules
225
+ print("calculating properties")
226
  ref_properties = calculate_properties(smiles)
227
  gen_properties = calculate_properties(gen_mol)
228
  tanimoto_similarity = calculate_tanimoto(smiles, gen_mol)
 
237
  df = pd.DataFrame(data)
238
 
239
  # Display molecule image of canonical smiles
240
+ print("Getting image")
241
  mol_image = smiles_to_image(gen_mol)
242
 
243
  return df, gen_mol, mol_image