Giter VIP home page Giter VIP logo

heart_stroke_prediction's Introduction

Heart Stroke Predictions Model In Production

Users : ๐Ÿฉบ

  • Medical professionals ๐Ÿ‘จโ€โš•๏ธ
  • Clinics / hospitals ๐Ÿฅ
  • Medical devices ๐Ÿ”ฌ

Usage Description: ๐Ÿซ€

After providing the necessary information to the health professionals of the user or inputting his or her personal & health information on the medical device or the Web Interface. Our model will use the the information provided by the user above to predict the probability of him having a stroke. After that the Web interface will display a detailed result about the patient status and possible precautions or advices to visit a professional

Features:

Our application will feature a :

  • Web interface & Data Search Interface using Streamlit
  • Prediciton API using FastApi
  • Machine Learning Model as Python Package "stroke-pred-p0w11'
  • Data Storage unit using PostgresSQl & Sqlalchmey
  • Data Ingestion job using Airflow to collect our data based on the user inputs.
  • Prediction monitoring dashboard using Gafana

Dataset:

Postgres Database Setup :

  1. Make sure to install database dependencies [psycopg2, python-dotenv, sqlalchemy]
    -Check stroke_heart_prediciton/requirements.txt (Remark For Mac, Linux Users psycopg2-binary) ๐Ÿ‘ˆ
  2. Create a (.env) file in the main Root => stroke_heart_prediciton/.env
  3. (.env) File Should Contain: โ—
[POSTGRES_DB]
POSTGRES_USER=[User]
POSTGRES_PASSWORD=[Password]
POSTGRES_SERVER=[Server]
POSTGRES_PORT=[Port]
POSTGRES_DB=[Database]

[FastApi]
BACKEND_SERVER =[Server]

  1. Open terminal and go to Cd stroke_heart_prediciton/postgres
  2. Run Python createdb.py to create the tables & relationships in your database

Airflow ( Follow the steps in Repo ) โฒ๏ธ

Airflow Repo - README.md
Link to Airflow

Grafana ( Follow the steps in Repo ) ๐ŸŒ€

Grafana Repo - README.md
Link to Grafana

Heroku Streamlit

Link to Web Interface

Execute Program Locally:

  1. Cd stroke_heart_prediciton/stroke_api; uvicorn main:app --host 0.0.0.0 --port 8005;

  2. streamlit run web_interface.py --server.port 8010;

System Architecture: ๐Ÿงฑ

Screenshot 2022-04-27 at 6 56 27 PM

heart_stroke_prediction's People

Contributors

ibrahim-sobh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

heart_stroke_prediction's Issues

Missing init tables patient, record, data_ingested

I face issue when running local (already run createdb.py)
`sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "record" does not exist
LINE 1: INSERT INTO record (file_name, doctor_first_name, doctor_las...
^

[SQL: INSERT INTO record (file_name, doctor_first_name, doctor_last_name, createdon) VALUES (%(file_name)s, %(doctor_first_name)s, %(doctor_last_name)s, %(createdon)s) RETURNING record.id]
[parameters: {'file_name': '-', 'doctor_first_name': 'inu', 'doctor_last_name': 'chan', 'createdon': datetime.datetime(2023, 2, 6, 16, 45, 37, 703804)}]
(Background on this error at: https://sqlalche.me/e/14/f405)`

It's ok if I add this line into createdb.py before running
import models

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.