Sign inSign up

gabcares/sepsis-fastapi

By gabcares

•Updated about 2 years ago

Identify ICU patients at risk of developing sepsis: PRG, PL, PR, SK, TS, M11, BD2, Age, Insurance

Image
API management
Machine learning & AI
Data science
0

407

gabcares/sepsis-fastapi repository overview

⁠Steps to use this backend and its frontend.

backend (gabcares/sepsis-fastapi)

frontend (gabcares/sepsis-streamlit)

Clone the full project on GitHub⁠

⁠1. Create a docker compose file using the snippet below.

services:
  cache:
    image: redis:7.2.3-alpine
    container_name: cache-redis
    restart: always
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/data
    networks:
      app-tier:

  api:
    build:
      context: ./src/api
      dockerfile: Dockerfile
    image: gabcares/sepsis-fastapi:latest
    container_name: fastapi
    command: uvicorn main:app --host 0.0.0.0 --port 7860
    volumes:
      - api:/src/api
    ports:
      - "7860:7860"
    env_file:
      - path: ./env/offline.env
        required: true
      - path: ./env/online.env
        required: false
    depends_on:
      - cache
    networks:
      app-tier:

  client:
    build:
      context: ./src/client
      dockerfile: Dockerfile
    image: gabcares/sepsis-streamlit:latest
    container_name: client-streamlit
    command: streamlit run app.py
    volumes:
      - client:/src/client
    ports:
      - "8501:8501"
    env_file:
      - path: ./env/offline.env
        required: true
      - path: ./env/online.env
        required: false
    depends_on:
      - api
    networks:
      app-tier:

networks:
  app-tier:
    driver: bridge

volumes:
  api:
  client:
  redis_data: {}

⁠2. Create an environment file at the root of the project in the directory /env/offline.env

# API
API_URL=http://api:7860/api/v1/prediction?model

# Redis local
REDIS_URL=redis://cache:6379/
REDIS_USERNAME=default

⁠3. Run the following commands in terminal at the root of the project.

docker-compose pull

docker-compose up

Tag summary

Content type

Image

Digest

sha256:6e3d57b77…

Size

729.2 MB

Last updated

about 2 years ago

docker pull gabcares/sepsis-fastapi