MolScribe icon indicating copy to clipboard operation
MolScribe copied to clipboard

Running in a Jupyter notebook works nicely. Running as a .py causes my computer to freeze due to insane cpu usage.

Open willfinnigan opened this issue 1 year ago • 3 comments

Running MolScribe in a Jupyter notebook works nicely for me. Running the same code as a .py causes my computer to freeze due to insane cpu usage.

Running this piece of code on M1 Mac

model = MolScribe(f'{folder}/data/swin_base_char_aux_1m.pth', device=torch.device('cpu'))

def mol_scribe_osr(filepath):
    output = model.predict_image_file(filepath, return_atoms_bonds=True, return_confidence=True)
    return output['smiles']

willfinnigan avatar Nov 22 '23 16:11 willfinnigan