Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +2 -1
gradio_app.py
CHANGED
|
@@ -52,11 +52,12 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
|
|
| 52 |
config = model_configs[model_name]
|
| 53 |
config.sample_num = num_molecules
|
| 54 |
|
|
|
|
| 55 |
if seed_num is not None:
|
| 56 |
try:
|
| 57 |
config.seed = int(seed_num)
|
| 58 |
except:
|
| 59 |
-
|
| 60 |
else:
|
| 61 |
config.seed = random.randint(0, 10000)
|
| 62 |
|
|
|
|
| 52 |
config = model_configs[model_name]
|
| 53 |
config.sample_num = num_molecules
|
| 54 |
|
| 55 |
+
print(seed_num)
|
| 56 |
if seed_num is not None:
|
| 57 |
try:
|
| 58 |
config.seed = int(seed_num)
|
| 59 |
except:
|
| 60 |
+
raise Exception("The seed must be an integer value!")
|
| 61 |
else:
|
| 62 |
config.seed = random.randint(0, 10000)
|
| 63 |
|