bcadkins01 commited on
Commit
231b5fc
·
verified ·
1 Parent(s): 71c0600

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -50,7 +50,7 @@ st.sidebar.header('Generation Parameters')
50
  creativity = st.sidebar.slider(
51
  'Creativity (Temperature):',
52
  min_value=0.0,
53
- max_value=2.0,
54
  value=1.0,
55
  step=0.1,
56
  help="Higher values lead to more diverse outputs."
@@ -60,7 +60,7 @@ creativity = st.sidebar.slider(
60
  num_molecules = st.sidebar.number_input(
61
  'Number of Molecules to Generate:',
62
  min_value=1,
63
- max_value=3, # Reduced from 5 to 3
64
  value=3,
65
  help="Select the number of molecules you want to generate (up to 3)."
66
  )
@@ -83,7 +83,7 @@ def generate_molecule_image(input_string, use_safe=False):
83
  # Generate standard molecule image
84
  mol = Chem.MolFromSmiles(input_string)
85
  if mol:
86
- img = Draw.MolToImage(mol, size=(200, 200))
87
  else:
88
  img = None
89
  return img
@@ -177,7 +177,7 @@ if st.button('Generate Molecules'):
177
 
178
  # Select only desired ADMET properties
179
  admet_properties = [
180
- 'molecular weight', 'logP', 'hydrogen_bond_acceptors',
181
  'hydrogen_bond_donors', 'QED', 'ClinTox', 'hERG', 'BBB_Martins'
182
  ]
183
  df_results_filtered = df_results[['SMILES', 'Valid'] + admet_properties]
 
50
  creativity = st.sidebar.slider(
51
  'Creativity (Temperature):',
52
  min_value=0.0,
53
+ max_value=2.5,
54
  value=1.0,
55
  step=0.1,
56
  help="Higher values lead to more diverse outputs."
 
60
  num_molecules = st.sidebar.number_input(
61
  'Number of Molecules to Generate:',
62
  min_value=1,
63
+ max_value=3, # Adjust as needed
64
  value=3,
65
  help="Select the number of molecules you want to generate (up to 3)."
66
  )
 
83
  # Generate standard molecule image
84
  mol = Chem.MolFromSmiles(input_string)
85
  if mol:
86
+ img = Draw.MolToImage(mol, size=(250, 250))
87
  else:
88
  img = None
89
  return img
 
177
 
178
  # Select only desired ADMET properties
179
  admet_properties = [
180
+ 'molecular_weight', 'logP', 'hydrogen_bond_acceptors',
181
  'hydrogen_bond_donors', 'QED', 'ClinTox', 'hERG', 'BBB_Martins'
182
  ]
183
  df_results_filtered = df_results[['SMILES', 'Valid'] + admet_properties]