Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +2 -3
gradio_app.py
CHANGED
@@ -57,8 +57,7 @@ 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, 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)
|
@@ -140,7 +139,7 @@ with gr.Blocks() as demo:
|
|
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.
|
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 |
|
62 |
if seed_num is None or seed_num.strip() == "":
|
63 |
config.seed = random.randint(0, 10000)
|
|
|
139 |
minimum=1,
|
140 |
value=100,
|
141 |
maximum=250,
|
142 |
+
info="This space runs on a CPU, which may result in slower performance. Generating 200 molecules takes approximately 6 minutes. Therefore, We set a 250-molecule cap. On a GPU, the model can generate 10,000 molecules in the same amount of time. Please check our GitHub repo for running our models on GPU."
|
143 |
)
|
144 |
|
145 |
seed_num = gr.Textbox(
|