Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +5 -2
gradio_app.py
CHANGED
|
@@ -53,7 +53,10 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
|
|
| 53 |
config.sample_num = num_molecules
|
| 54 |
|
| 55 |
if seed_num is not None:
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
else:
|
| 58 |
config.seed = random.randint(0, 10000)
|
| 59 |
|
|
@@ -130,7 +133,7 @@ with gr.Blocks() as demo:
|
|
| 130 |
maximum=10_000,
|
| 131 |
)
|
| 132 |
|
| 133 |
-
seed_num = gr.
|
| 134 |
label="RNG seed value (can be used for reproducibility):"
|
| 135 |
)
|
| 136 |
|
|
|
|
| 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 |
+
return
|
| 60 |
else:
|
| 61 |
config.seed = random.randint(0, 10000)
|
| 62 |
|
|
|
|
| 133 |
maximum=10_000,
|
| 134 |
)
|
| 135 |
|
| 136 |
+
seed_num = gr.Textbox(
|
| 137 |
label="RNG seed value (can be used for reproducibility):"
|
| 138 |
)
|
| 139 |
|