Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +6 -1
gradio_app.py
CHANGED
@@ -51,7 +51,11 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
|
|
51 |
|
52 |
config = model_configs[model_name]
|
53 |
config.sample_num = num_molecules
|
54 |
-
|
|
|
|
|
|
|
|
|
55 |
|
56 |
inferer = Inference(config)
|
57 |
scores = inferer.inference() # create scores_df out of this
|
@@ -130,6 +134,7 @@ with gr.Blocks() as demo:
|
|
130 |
label="RNG seed value (can be used for reproducibility):",
|
131 |
precision=0, # integer input
|
132 |
minimum=0,
|
|
|
133 |
)
|
134 |
|
135 |
submit_button = gr.Button(
|
|
|
51 |
|
52 |
config = model_configs[model_name]
|
53 |
config.sample_num = num_molecules
|
54 |
+
|
55 |
+
if seed_num is not None:
|
56 |
+
config.seed = seed_num
|
57 |
+
else:
|
58 |
+
config.seed = random.randint(0, 10000)
|
59 |
|
60 |
inferer = Inference(config)
|
61 |
scores = inferer.inference() # create scores_df out of this
|
|
|
134 |
label="RNG seed value (can be used for reproducibility):",
|
135 |
precision=0, # integer input
|
136 |
minimum=0,
|
137 |
+
value = None,
|
138 |
)
|
139 |
|
140 |
submit_button = gr.Button(
|