Skip to content

Streamlit Data Web Application using Facebook’s forecasting algorithm - Prophet

License

Notifications You must be signed in to change notification settings

CloudNua/ml-forecast-app

Repository files navigation

ML Forecast Application

This is python web application build using Streamlit for predicting stock prices using Facebook's forecasting algorithm Prophet

Please refer to the docs folder in which there is a Python based Jupyter note book detailing all relevant comments pertaining to the the individual functions this application is developed upon

This has been exported to a PDF file for ease of reading at Stock Prediction Application

This application can be executed via two methods:

  1. Using native local host execution via Streamlit's inbuilt web server protocol
  2. Using docker

Application Runtime

Locally

Prerequisites as per the text file

Install Python Libraries

pip3 install -r requirements.txt

Run application locally

steamlit run src/main.py

Expected output: asciicast

Docker build and execution

Prerequisites:

Build Docker image in current directory

The docker logic has been developed as follows:

  • Multi-stage build. In the first stage all necessary Python packages are installed inside a virtual environment
  • Create a non-root user with the correct user permissions. Then copy the Python libraries from the build image into the runtime image.
  • Mount local folders from your computer to the Docker container. Develop the app while using Docker and save changes.

A docker compose file has been utilised for convenience of application loading

To execute the build of the docker image build via the below command:

docker-compose build

Expected Output: asciicast

Run docker image with port 8501 and volumes

docker run -it --rm --port '8501:8501' -v '$(pwd)/project:/usr/scr/app/project:delegated' latest

Run Application

Start the Docker container in the background with docker-compose

docker-compose up -d

System Requirements

From local testing, to successfully run this application the minimum spec is:

  • 3 vCPU
  • 10 GB RAM

*** Note: This is primarily due to system requirements for running PyStan ***

About

Streamlit Data Web Application using Facebook’s forecasting algorithm - Prophet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published