Predicts the likelihood of hospital admission for patients with pneumonia.
  • Jupyter Notebook 89.4%
  • Python 10.4%
  • Dockerfile 0.2%
Find a file
datsudo b023d1e260
Some checks failed
Sync to Hugging Face hub / sync-to-hub (push) Failing after 4s
docs / deploy (push) Failing after 31s
change graph
2025-01-23 06:55:30 +08:00
.github/workflows Setup documentation (#3) 2024-10-13 19:08:11 +08:00
.streamlit Update README 2024-10-14 22:44:09 +08:00
datasets Apply new features (#4) 2024-12-05 23:20:16 +08:00
docs Update docs 2024-10-14 22:36:01 +08:00
images Change banner 2024-12-06 00:16:18 +08:00
pneumonia_predictor change graph 2025-01-23 06:55:30 +08:00
saved_models fix: rf_smote saved model 2024-12-14 16:15:02 +08:00
.gitattributes Feat/datsudo/rf smote (#1) 2024-10-08 01:03:14 +08:00
.gitignore update gitgnore 2024-12-14 12:45:13 +08:00
.pre-commit-config.yaml Initial commit 2024-10-07 16:16:30 +08:00
.python-version feat: switch from poetry -> uv 2025-01-09 16:46:48 +08:00
app.py Update: UI (#6) 2024-12-12 23:46:57 +08:00
CONTRIBUTING.md Initial commit 2024-10-07 16:16:30 +08:00
Dockerfile Switch to docker 2024-10-08 11:30:47 +08:00
LICENSE Initial commit 2024-10-07 16:16:30 +08:00
main.ipynb Fix: label 2024-12-13 02:54:15 +08:00
mkdocs.yml Setup documentation (#3) 2024-10-13 19:08:11 +08:00
packages.txt fix name 2024-10-08 11:32:00 +08:00
pyproject.toml feat: switch from poetry -> uv 2025-01-09 16:46:48 +08:00
README.md Update README 2024-12-05 23:22:21 +08:00
requirements.txt Update requirements 2024-10-13 19:16:08 +08:00
uv.lock feat: switch from poetry -> uv 2025-01-09 16:46:48 +08:00

title emoji colorFrom colorTo sdk app_port pinned license
Pneumonia Predictor 🚀 blue indigo docker 8501 false gpl-3.0
App icon

Pneumonia Predictor

License Spaces python

Documentation: https://datsudo.github.io/pneumonia-predictor/

Setup

Install the following prerequisites:

  1. Python 3.12
  2. Poetry (for dependency management)

Make sure that poetry is installed by running:

poetry --version

# Result must be:
# Poetry (version X.X.X)

Clone this repository:

git clone https://github.com/datsudo/pneumonia-predictor

Then install the project dependencies when you're inside the directory:

poetry install

Before working on this project, ALWAYS make sure that everytime you're working on this project, you're in the proper virtual environment created by poetry:

poetry shell

After that, setup the provided pre-commit hooks (to fix proper code styling for staged files before commiting) after cloning.

pre-commit install

Running

Sample usage

from pneumonia_predictor.backend.rf_active_smote import RfActiveSMOTE()

# Create an RFActiveSMOTE instance
rf_as = RfActiveSMOTE(X_train, y_train, X_test, y_test, "target_column_name")

# Training
rf_as.smote.train(n_iterations=5)

# Other options
rf_as.save("model_name")  # will save the model at ./saved_models/model_name.pkl

rf_as.display_results("acc")  # Print results [acc (Accuracy), min (Minority), maj (Majority), avg (Weighted Average)]

Web app

Open the app by running

streamlit run app.py

The web app will become accessible at http://localhost:8502.

License

This project is licensed under GNU General Public License v3.0.