Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,8 +74,6 @@ def function(model_name: str, num_molecules: int, seed_num: int):
|
|
| 74 |
'''
|
| 75 |
if model_name == "DrugGEN-NoTarget":
|
| 76 |
model_name = "NoTarget"
|
| 77 |
-
else:
|
| 78 |
-
model_name = "DrugGEN"
|
| 79 |
|
| 80 |
config = model_configs[model_name]
|
| 81 |
config.sample_num = num_molecules
|
|
@@ -91,6 +89,9 @@ def function(model_name: str, num_molecules: int, seed_num: int):
|
|
| 91 |
except ValueError:
|
| 92 |
raise gr.Error("The seed must be an integer value!")
|
| 93 |
|
|
|
|
|
|
|
|
|
|
| 94 |
inferer = Inference(config)
|
| 95 |
start_time = time.time()
|
| 96 |
scores = inferer.inference() # This returns a DataFrame with specific columns
|
|
|
|
| 74 |
'''
|
| 75 |
if model_name == "DrugGEN-NoTarget":
|
| 76 |
model_name = "NoTarget"
|
|
|
|
|
|
|
| 77 |
|
| 78 |
config = model_configs[model_name]
|
| 79 |
config.sample_num = num_molecules
|
|
|
|
| 89 |
except ValueError:
|
| 90 |
raise gr.Error("The seed must be an integer value!")
|
| 91 |
|
| 92 |
+
if model_name != "NoTarget":
|
| 93 |
+
model_name = "DrugGEN"
|
| 94 |
+
|
| 95 |
inferer = Inference(config)
|
| 96 |
start_time = time.time()
|
| 97 |
scores = inferer.inference() # This returns a DataFrame with specific columns
|