AI-powered liver toxicity predictions made simple for everyone
##live demo https://hapatox.onrender.com/
HepatoTox turns complex hepatotoxicity (liver damage) predictions into bright, plain-language insights anyone can understand. Paste a SMILES string, upload a CSV, or browse our molecule library—then watch three AI models team up to give you a simple verdict plus color-coded explanations.
Built on peer-reviewed research featuring GAHT (Geo-Aware Hybrid Transformer), Random Forest, and MLP models trained on 4,979 molecules from Tox21 assays.
- 🎯 One-Click Predictions – Paste SMILES, get toxicity verdict in under a minute
- 🎨 Colorful Explanations – See red/green atom highlights showing exactly why a model flagged risk
- 📚 Browseable Library – Filter 4,979+ molecules like a Pinterest board
- 📊 Batch Upload – Process up to 100 molecules from CSV and download friendly reports
- 🔬 No Jargon Mode – All pages written for non-technical teammates
- 🚀 Always Free – No login, no tracking, just predictions
Plain-language metrics and a warm welcome replacing intimidating accuracy tables.
Drop in a SMILES, choose an example, and see all three models vote with confidence badges.
Red atoms = risky motifs, green atoms = calming influence. Perfect for screen sharing.
Filter by toxicity, click "Predict," or bookmark favorites for later.
Instead of AUROC tables, we explain model personalities and QA routines in everyday words.
Highlights from the GAHT paper without requiring a PhD to follow along.
Upload CSV, download friendly report—great for Friday backlog clears.
- Python 3.8+
- pip package manager
- 4GB+ RAM recommended (for model loading)
# Clone the repository
git clone https://github.com/yourusername/hepatotox-predictor.git
cd hepatotox-predictor
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.pyVisit http://127.0.0.1:5000 in your browser.
web/
├── app.py # Flask application entry point
├── config.py # Paths, model settings
├── requirements.txt # Python dependencies
│
├── models/ # Model loading & prediction
│ ├── gaht_model.py # GAHT PyTorch architecture
│ ├── model_loader.py # Load trained models
│ └── predictor.py # Unified prediction pipeline
│
├── utils/ # Chemistry & visualization helpers
│ ├── molecule_utils.py # SMILES validation, RDKit
│ ├── feature_extraction.py # ECFP, descriptors, 3D conformers
│ └── visualization.py # Molecule rendering, heatmaps
│
├── templates/ # HTML pages
│ ├── base.html # Layout with sweet navbar/footer
│ ├── index.html # Landing page
│ ├── predict.html # Single prediction
│ ├── explainability.html # XAI viewer
│ ├── dataset.html # Molecule gallery
│ ├── performance.html # Trust playbook
│ ├── research.html # Paper highlights
│ └── batch.html # Batch upload
│
├── static/ # CSS, JS, images
│ ├── css/style.css # Custom pastel palette
│ └── js/app.js # Frontend interactions
│
└── screenshots/ # Images for this README
- Navigate to Predict from the navbar
- Paste a SMILES string (or click an example button)
- Hit Predict Toxicity
- Read the consensus verdict plus individual model votes
- Click Explain Prediction to see atom highlights
- From prediction results, click Explain
- View the color-coded heatmap (red = risky atoms)
- Read the atom importance table
- Screenshot or share the visual with your team
- Visit Dataset page
- Filter by toxicity (Toxic / Non-toxic)
- Click any molecule card's Predict button
- Bookmark the URL to save filters
- Prepare a CSV with a
SMILEScolumn - Go to Batch Mode
- Upload your file (max 100 rows)
- Download the results CSV with verdicts and notes
| Model | Personality | Best For |
|---|---|---|
| GAHT | Deep thinker spotting risky motifs fast | Earliest warnings, even if cautious |
| Random Forest | Practical friend grounded in chemistry rules | Steady verdicts matching bench intuition |
| MLP | Speedy checker keeping everyone honest | Quick second opinions during screening |
All three vote independently; consensus logic summarizes the tone for you.
- Source: Tox21 Challenge (AhR, Casp3, RT assays)
- Size: 4,979 unique molecules after deduplication
- Validation: 5-fold scaffold-based cross-validation
- No Public Metrics: We hide raw accuracy tables and share trust routines instead (see Performance page)
For full validation notebooks and private reports, contact us via the footer link.
- Backend: Flask 3.0
- ML: PyTorch (GAHT), scikit-learn (RF/MLP)
- Chemistry: RDKit
- Frontend: Bootstrap 5, Font Awesome, jQuery
- Hosting: Render / Railway / Fly.io recommended
Render (recommended):
- Push this repo to GitHub
- Create new Web Service on Render
- Point to
app.py, set start command:gunicorn app:app - Deploy – auto-sleeps after 15min inactivity
Railway:
- Connect repo → Railway auto-detects Flask → Deploy
Fly.io:
- Requires Dockerfile; no auto-sleep, better for prod
See deployment guide for step-by-step.
We welcome contributions! To get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows existing style (friendly, accessible copy)
- All pages remain jargon-free
- Screenshots updated if UI changes
If you use HepatoTox in research or production, please cite:
@article{hepatotox2025,
title={GAHT: Geo-Aware Hybrid Transformer for Hepatotoxicity Prediction},
author={Your Name},
journal={Journal Name},
year={2025},
volume={XX},
pages={XXX-XXX}
}- Issues: GitHub Issues
- Email: iamsuraj87104@gmail.com
- Documentation: Full Docs
This project is licensed under the MIT License - see LICENSE file for details.
- Tox21 Challenge for the hepatotoxicity dataset
- RDKit community for chemistry tools
- Flask & Bootstrap teams for web frameworks
- All peer reviewers who shaped the GAHT research
Built with ❤️ for scientists, chemists, and curious minds everywhere