mgyigit commited on
Commit
d55b645
1 Parent(s): 90e4f53

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -2
gradio_app.py CHANGED
@@ -57,7 +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("LIMIT ERROR!")
 
61
 
62
  if seed_num is None or seed_num.strip() == "":
63
  config.seed = random.randint(0, 10000)
@@ -139,7 +140,7 @@ with gr.Blocks() as demo:
139
  minimum=1,
140
  value=1000,
141
  maximum=10_000,
142
- info="It will take ~20-60 seconds to generate 1000 mols."
143
  )
144
 
145
  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 molecules. \
61
+ If you need to generate more molecules, 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
  minimum=1,
141
  value=1000,
142
  maximum=10_000,
143
+ info="This model currently runs on a CPU, which may result in slower performance. Generating 200 molecules takes approximately 6 minutes on this space. 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."
144
  )
145
 
146
  seed_num = gr.Textbox(