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

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -0
gradio_app.py CHANGED
@@ -56,6 +56,9 @@ def function(model_name: str, num_molecules: int, seed_num: int) -> tuple[PIL.Im
56
  config = model_configs[model_name]
57
  config.sample_num = num_molecules
58
 
 
 
 
59
  if seed_num is None or seed_num.strip() == "":
60
  config.seed = random.randint(0, 10000)
61
  else:
 
56
  config = model_configs[model_name]
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)
64
  else: