Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +5 -5
gradio_app.py
CHANGED
@@ -57,8 +57,8 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
|
|
57 |
config.sample_num = num_molecules
|
58 |
|
59 |
if config.sample_num > 250:
|
60 |
-
raise gr.Error("You have requested to generate more than the allowed limit of 250 molecules. Please reduce your request to 250 or fewer
|
61 |
-
If you need to generate more
|
62 |
|
63 |
if seed_num is None or seed_num.strip() == "":
|
64 |
config.seed = random.randint(0, 10000)
|
@@ -138,9 +138,9 @@ with gr.Blocks() as demo:
|
|
138 |
label="Number of molecules to generate",
|
139 |
precision=0, # integer input
|
140 |
minimum=1,
|
141 |
-
value=
|
142 |
-
maximum=
|
143 |
-
info="This
|
144 |
)
|
145 |
|
146 |
seed_num = gr.Textbox(
|
|
|
57 |
config.sample_num = num_molecules
|
58 |
|
59 |
if config.sample_num > 250:
|
60 |
+
raise gr.Error("You have requested to generate more than the allowed limit of 250 molecules. Please reduce your request to 250 or fewer. \
|
61 |
+
If you need to generate more, please visit our GitHub repository for instructions on running the model on your own setup with no limit.")
|
62 |
|
63 |
if seed_num is None or seed_num.strip() == "":
|
64 |
config.seed = random.randint(0, 10000)
|
|
|
138 |
label="Number of molecules to generate",
|
139 |
precision=0, # integer input
|
140 |
minimum=1,
|
141 |
+
value=100,
|
142 |
+
maximum=250,
|
143 |
+
info="This space runs on a CPU, which may result in slower performance. Generating 200 molecules takes approximately 6 minutes. The model can generate 10,000 molecules on a GPU in the same amount of time. For faster results, consider running the model on a GPU (please check our GitHub repository for this). "
|
144 |
)
|
145 |
|
146 |
seed_num = gr.Textbox(
|