Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -261,19 +261,20 @@ For more details, see our [paper on arXiv](https://arxiv.org/abs/2302.07868).
|
|
261 |
- **SNN ChEMBL**: Similarity to ChEMBL molecules (higher means more similar to known drug-like compounds)
|
262 |
- **SNN Real Inhibitors**: Similarity to known drugs (higher means more similar to approved drugs)
|
263 |
""")
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
# Use Gradio Tabs to separate the two modes.
|
266 |
with gr.Tabs():
|
267 |
with gr.TabItem("Classical Generation"):
|
268 |
with gr.Row():
|
269 |
with gr.Column(scale=1):
|
270 |
-
model_name = gr.Radio(
|
271 |
-
choices=("DrugGEN-AKT1", "DrugGEN-CDK2", "DrugGEN-NoTarget"),
|
272 |
-
value="DrugGEN-AKT1",
|
273 |
-
label="Select Target Model",
|
274 |
-
info="Choose which protein target or general model to use for molecule generation"
|
275 |
-
)
|
276 |
-
|
277 |
num_molecules = gr.Slider(
|
278 |
minimum=10,
|
279 |
maximum=200,
|
@@ -294,25 +295,6 @@ For more details, see our [paper on arXiv](https://arxiv.org/abs/2302.07868).
|
|
294 |
variant="primary",
|
295 |
size="lg"
|
296 |
)
|
297 |
-
with gr.Column(scale=2):
|
298 |
-
basic_metrics_df = gr.Dataframe(
|
299 |
-
headers=["Validity", "Uniqueness", "Novelty (Train)", "Novelty (Inference)", "Novelty (Real Inhibitors)", "Runtime (s)"],
|
300 |
-
elem_id="basic-metrics"
|
301 |
-
)
|
302 |
-
|
303 |
-
advanced_metrics_df = gr.Dataframe(
|
304 |
-
headers=["QED", "SA Score", "Internal Diversity", "SNN (ChEMBL)", "SNN (Real Inhibitors)", "Average Length"],
|
305 |
-
elem_id="advanced-metrics"
|
306 |
-
)
|
307 |
-
|
308 |
-
file_download = gr.File(
|
309 |
-
label="Download All Generated Molecules (SMILES format)"
|
310 |
-
)
|
311 |
-
|
312 |
-
image_output = gr.Image(
|
313 |
-
label="Structures of Randomly Selected Generated Molecules",
|
314 |
-
elem_id="molecule_display"
|
315 |
-
)
|
316 |
|
317 |
with gr.TabItem("Custom Input SMILES"):
|
318 |
with gr.Row():
|
@@ -334,25 +316,22 @@ For more details, see our [paper on arXiv](https://arxiv.org/abs/2302.07868).
|
|
334 |
variant="primary",
|
335 |
size="lg"
|
336 |
)
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
|
|
342 |
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
|
348 |
-
|
349 |
-
label="Download All Molecules (SMILES format)"
|
350 |
-
)
|
351 |
|
352 |
-
|
353 |
-
|
354 |
-
elem_id="molecule_display_custom"
|
355 |
-
)
|
356 |
|
357 |
gr.Markdown("### Created by the HUBioDataLab | [GitHub](https://github.com/HUBioDataLab/DrugGEN) | [Paper](https://arxiv.org/abs/2302.07868)")
|
358 |
|
|
|
261 |
- **SNN ChEMBL**: Similarity to ChEMBL molecules (higher means more similar to known drug-like compounds)
|
262 |
- **SNN Real Inhibitors**: Similarity to known drugs (higher means more similar to approved drugs)
|
263 |
""")
|
264 |
+
with gr.Row():
|
265 |
+
with gr.Column(scale=1):
|
266 |
+
model_name = gr.Radio(
|
267 |
+
choices=("DrugGEN-AKT1", "DrugGEN-CDK2", "DrugGEN-NoTarget"),
|
268 |
+
value="DrugGEN-AKT1",
|
269 |
+
label="Select Target Model",
|
270 |
+
info="Choose which protein target or general model to use for molecule generation"
|
271 |
+
)
|
272 |
+
|
273 |
# Use Gradio Tabs to separate the two modes.
|
274 |
with gr.Tabs():
|
275 |
with gr.TabItem("Classical Generation"):
|
276 |
with gr.Row():
|
277 |
with gr.Column(scale=1):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
num_molecules = gr.Slider(
|
279 |
minimum=10,
|
280 |
maximum=200,
|
|
|
295 |
variant="primary",
|
296 |
size="lg"
|
297 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
|
299 |
with gr.TabItem("Custom Input SMILES"):
|
300 |
with gr.Row():
|
|
|
316 |
variant="primary",
|
317 |
size="lg"
|
318 |
)
|
319 |
+
|
320 |
+
with gr.Column(scale=2):
|
321 |
+
basic_metrics_df = gr.Dataframe(
|
322 |
+
headers=["Validity", "Uniqueness", "Novelty (Train)", "Novelty (Inference)", "Novelty (Real Inhibitors)", "Runtime (s)"],
|
323 |
+
elem_id="basic-metrics"
|
324 |
+
)
|
325 |
|
326 |
+
advanced_metrics_df = gr.Dataframe(
|
327 |
+
headers=["QED", "SA Score", "Internal Diversity", "SNN (ChEMBL)", "SNN (Real Inhibitors)", "Average Length"],
|
328 |
+
elem_id="advanced-metrics"
|
329 |
+
)
|
330 |
|
331 |
+
file_download = gr.File(label="Download All Generated Molecules (SMILES format)")
|
|
|
|
|
332 |
|
333 |
+
image_output = gr.Image(label="Structures of Randomly Selected Generated Molecules",
|
334 |
+
elem_id="molecule_display")
|
|
|
|
|
335 |
|
336 |
gr.Markdown("### Created by the HUBioDataLab | [GitHub](https://github.com/HUBioDataLab/DrugGEN) | [Paper](https://arxiv.org/abs/2302.07868)")
|
337 |
|