Spaces:
Sleeping
Sleeping
Update app.py
Browse files80 unmodified lines8182838484858687888990919192939480 unmodified lines if len(smiles_list) > 100: raise gr.Error("You have provided more than the allowed limit of 100 molecules. Please provide 100 or fewer.") # Write the custom SMILES to a temporary file and update config temp_input_file = "custom_input.smi" config.seed = random.randint(0, 10000) temp_input_file = f"custom_input{config.seed}.smi" with open(temp_input_file, "w") as f: for s in smiles_list: f.write(s + "\n") config.inf_smiles = temp_input_file config.sample_num = len(smiles_list) # Always use a random seed for custom mode config.seed = random.randint(0, 10000) else: # Classical Generation mode config.sample_num = num_moleculesapp.py+2-2