Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +6 -4
gradio_app.py
CHANGED
@@ -53,7 +53,7 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
|
|
53 |
config = model_configs[model_name]
|
54 |
config.sample_num = num_molecules
|
55 |
|
56 |
-
if seed_num is not None:
|
57 |
try:
|
58 |
config.seed = int(seed_num)
|
59 |
except ValueError:
|
@@ -123,7 +123,7 @@ with gr.Blocks() as demo:
|
|
123 |
choices=("DrugGEN", "NoTarget"),
|
124 |
value="DrugGEN",
|
125 |
label="Select a model to make inference",
|
126 |
-
info="
|
127 |
)
|
128 |
|
129 |
num_molecules = gr.Number(
|
@@ -132,11 +132,13 @@ with gr.Blocks() as demo:
|
|
132 |
minimum=1,
|
133 |
value=1000,
|
134 |
maximum=10_000,
|
|
|
135 |
)
|
136 |
|
137 |
seed_num = gr.Textbox(
|
138 |
-
label="RNG seed value
|
139 |
-
value=None
|
|
|
140 |
)
|
141 |
|
142 |
submit_button = gr.Button(
|
|
|
53 |
config = model_configs[model_name]
|
54 |
config.sample_num = num_molecules
|
55 |
|
56 |
+
if seed_num is not None or seed_num != '':
|
57 |
try:
|
58 |
config.seed = int(seed_num)
|
59 |
except ValueError:
|
|
|
123 |
choices=("DrugGEN", "NoTarget"),
|
124 |
value="DrugGEN",
|
125 |
label="Select a model to make inference",
|
126 |
+
info="DrugGEN model design molecules to target the AKT1 protein (P31749)."
|
127 |
)
|
128 |
|
129 |
num_molecules = gr.Number(
|
|
|
132 |
minimum=1,
|
133 |
value=1000,
|
134 |
maximum=10_000,
|
135 |
+
info="It will take ~75-80 seconds to generate 1000 mols."
|
136 |
)
|
137 |
|
138 |
seed_num = gr.Textbox(
|
139 |
+
label="RNG seed value",
|
140 |
+
value=None,
|
141 |
+
info="This is optional, it can be used for reproducibility."
|
142 |
)
|
143 |
|
144 |
submit_button = gr.Button(
|