How royan04/respirex works
Respirx is a Flask web app for classifying uploaded chest X-rays as COVID-19, Normal, Pneumonia, or Tuberculosis. The main workflow accepts an image, preprocesses it, runs the loaded model, stores the prediction, and returns the result; users can later view predictions and download a generated medical report. Login routes doctors and patients to different pages. The README also mentions training controls and visualizations, but the available source shows no implementation for them, so they are not mapped here.
Main entry points: app.py Flask routes · predictions.db Prediction records · login.html Login page · doctors.html Doctor page
Components 14
Web application
- Flask routes
app.py - Login page
templates/login.html - Doctor page
templates/doctors.html - Report page
templates/report.html - Result page
templates/result.html
Image inference
- Image preprocessing
app.py - Classifier inference
app.py - Trained weights
best_weight.h5
Accounts and records
- Prediction records
instance/predictions.db - User records
instance/predictions.db
Medical reports
- Report generation
app.py - PDF report
Other components
- Patient
- Doctor
Connections 17
- Patient → Flask routes: uploads X-ray
README.md - Doctor → Flask routes: uses web app
README.md - Flask routes → Image preprocessing: processes image
app.py - Image preprocessing → Classifier inference: passes tensor
app.py - Classifier inference → Trained weights: loads model
app.py - Classifier inference → Prediction records: saves prediction
app.py - Flask routes → Result page: renders page
app.py - Patient → Flask routes: requests login
app.py - Doctor → Flask routes: requests login
app.py - Flask routes → Login page: renders page
app.py - Flask routes → User records: checks account
app.py - Flask routes → Doctor page: redirects doctor
app.py - Flask routes → Report page: renders records
app.py - Flask routes → Prediction records: queries records
app.py - Flask routes → Report generation: generates report
app.py - Report generation → PDF report: writes PDF
app.py - Patient → Flask routes: downloads report
app.py