Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
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, #
|
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=(
|
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 |
-
'
|
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]
|