How ahamedn2023-gif/cnsr_ai works
This is a Flask web app for anonymous benign/malignant image classification, with prediction history and a separate model-training workflow. The main path is anonymous login, image upload, preprocessing and inference, saving the prediction, then showing the result. The source also supports browsing prior predictions and logging out. Templates and dataset contents were not sampled, so UI wiring beyond the routes and rendered templates is not detailed.
Main entry points: app.py Flask routes · trainmodel.py Training workflow · model.h5 Classifier model · database.db Prediction database
Components 13
Web workflow
- Flask routes
app.py - Login page
templates/login.html - Upload page
templates/index.html - Result page
templates/result.html - History page
templates/history.html - Upload preview
static/script.js
Prediction
- Image preprocessing
app.py - Classifier model
model.h5 - Uploaded images
static/uploads
Prediction records
- Prediction database
database.db
Model training
- Training workflow
trainmodel.py - Image dataset
dataset
Other components
- Visitor
Connections 12
- Visitor → Flask routes: requests pages
- Flask routes → Login page: renders
- Flask routes → Upload page: renders
- Flask routes → Result page: renders result
- Flask routes → History page: renders history
- Flask routes → Uploaded images: saves image
- Flask routes → Image preprocessing: prepares image
- Flask routes → Classifier model: predicts with
- Flask routes → Prediction database: writes prediction
- Flask routes → Prediction database: reads history
- Training workflow → Image dataset: trains from
- Training workflow → Classifier model: saves model