SMART / README.md
liupf's picture
Upload 2 files
f1a0264 verified
|
Raw History Blame Contribute Delete
1.98 kB

A newer version of the Gradio SDK is available: 6.31.0

Upgrade
metadata
title: SMART EI Spectrum Prediction
emoji: 🧪
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 6.9.0
python_version: 3.10.13
app_file: app.py
pinned: false
short_description: Predict an EI mass spectrum from a molecular SMILES

SMART

Structure- and Mass-Aware EI Mass Spectrum Prediction for New Psychoactive Substance Screening.

Enter one molecular SMILES to display its structure and predicted EI stick spectrum. The English interface supports peak inspection, zooming, and CSV, MSP, and PNG downloads. Chromatographic retention times are not predicted.

Upload the exported assets folder alongside the Python files and restart the Space. The app displays a clear unavailable message until verified model assets are present; it never substitutes demonstration spectra. The original trained checkpoints and frozen reference library are required.

Select ZeroGPU hardware to run CUDA inference. The application imports spaces before model loading, places the model on CUDA at startup, and wraps prediction with spaces.GPU. On CPU hardware it uses CPU automatically. An explicit SMART_DEVICE=cpu or SMART_DEVICE=cuda overrides the selection. SMART_ASSETS can point to an alternative asset directory.

Only neutral, single-component molecular structures are accepted. The model does not distinguish stereoisomers. A structure found in the training reference bank is marked in the interface. Predictions cover the frozen model's m/z 0–750 range and normalize the base peak to 100.

Requests run one at a time. Export files expire after approximately 24 hours. Downloads retain fixed English CSV and MSP field names. Plot labels, messages, and exported figures use English.

To run locally:

python -m pip install -r requirements.txt
python app.py

Open the local Gradio address shown in the terminal. Real inference and ZeroGPU startup must be verified with the exported trained assets in the target environment before sharing the Space.