How snmiitb-bit/chem-image-to-smiles works
The repository provides two ways to turn chemical-structure images into SMILES: a Streamlit web app that sends image bytes to Hugging Face DECIMER, and a command-line function that runs DECIMER locally on an image path. Both validate and canonicalize predictions with RDKit; valid results are copied to the clipboard, and the web app also displays a molecular preview. The README is empty, so the workflow and capabilities shown here are based on the sampled source files.
Main entry points: app.py Streamlit app · image2smiles.py Image converter
Components 11
Other components
- Web user
- CLI user
- Streamlit app
app.py - Hugging Face DECIMER
- SMILES validation
app.py - Clipboard copy
app.py - Molecule preview
app.py - Image converter
image2smiles.py - Local DECIMER
image2smiles.py - SMILES validation
image2smiles.py - Clipboard copy
image2smiles.py
Connections 10
- Web user → Streamlit app: uploads image
app.py - Streamlit app → Hugging Face DECIMER: posts image bytes
app.py - Hugging Face DECIMER → Streamlit app: returns prediction
app.py - Streamlit app → SMILES validation: validates prediction
app.py - Streamlit app → Clipboard copy: copies SMILES
app.py - Streamlit app → Molecule preview: renders molecule
app.py - CLI user → Image converter: provides image path
image2smiles.py - Image converter → Local DECIMER: predicts SMILES
image2smiles.py - Image converter → SMILES validation: validates prediction
image2smiles.py - Image converter → Clipboard copy: copies SMILES
image2smiles.py