Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +4 -5
gradio_app.py
CHANGED
|
@@ -86,8 +86,8 @@ class NoTargetConfig(DrugGENConfig):
|
|
| 86 |
|
| 87 |
model_configs = {
|
| 88 |
"Prot": ProtConfig(),
|
| 89 |
-
"
|
| 90 |
-
"NoTarget": NoTargetConfig(),
|
| 91 |
}
|
| 92 |
|
| 93 |
|
|
@@ -97,7 +97,6 @@ def function(model_name: str, mol_num: int, seed: int) -> tuple[PIL.Image, pd.Da
|
|
| 97 |
Returns:
|
| 98 |
image, score_df, file path
|
| 99 |
'''
|
| 100 |
-
model_name = model_name.replace("DrugGEN-", "")
|
| 101 |
|
| 102 |
config = model_configs[model_name]
|
| 103 |
config.inference_sample_num = mol_num
|
|
@@ -160,8 +159,8 @@ with gr.Blocks() as demo:
|
|
| 160 |
- **DrugGEN-NoTarget**: composed of one GAN, focuses on learning the chemical properties from the ChEMBL training dataset, no target-specific generation.
|
| 161 |
""")
|
| 162 |
model_name = gr.Radio(
|
| 163 |
-
choices=("DrugGEN
|
| 164 |
-
value="DrugGEN
|
| 165 |
label="Select a model to make inference",
|
| 166 |
info=" DrugGEN-Prot and DrugGEN-CrossLoss models design molecules to target the AKT1 protein"
|
| 167 |
)
|
|
|
|
| 86 |
|
| 87 |
model_configs = {
|
| 88 |
"Prot": ProtConfig(),
|
| 89 |
+
"DrugGEN": CrossLossConfig(),
|
| 90 |
+
"DrugGEN-NoTarget": NoTargetConfig(),
|
| 91 |
}
|
| 92 |
|
| 93 |
|
|
|
|
| 97 |
Returns:
|
| 98 |
image, score_df, file path
|
| 99 |
'''
|
|
|
|
| 100 |
|
| 101 |
config = model_configs[model_name]
|
| 102 |
config.inference_sample_num = mol_num
|
|
|
|
| 159 |
- **DrugGEN-NoTarget**: composed of one GAN, focuses on learning the chemical properties from the ChEMBL training dataset, no target-specific generation.
|
| 160 |
""")
|
| 161 |
model_name = gr.Radio(
|
| 162 |
+
choices=("DrugGEN", "DrugGEN-NoTarget"),
|
| 163 |
+
value="DrugGEN",
|
| 164 |
label="Select a model to make inference",
|
| 165 |
info=" DrugGEN-Prot and DrugGEN-CrossLoss models design molecules to target the AKT1 protein"
|
| 166 |
)
|