scailfin / flowserv-flaskapp-pie

Flowserv Flask Application for PIE Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flowserv Flask App - Processing Images Easily (PIE)

This repository demonstrates the use of the Flask App Template for running custom applications based on flowserv workflows. This project uses the HTML templates from the pie-flask repository to expose the Colony Recognition Analysis workflow from the Processing Images Easily (PIE) project via a web interface.

Installation & Configuration

Install Project Sources and Dependencies

We recommend using a virtual environment for the installation (e.g., conda create -n pieflask python=3.8 pip if using Anaconda). At the time of writing, the following commands would not work with Python 3.9 (but only 3.7 or 3.8). After activating the virtual environment (e.g., conda activate pieflask) first clone the repository and then install the project requirements:

git clone git@github.com:scailfin/flowserv-flaskapp-pie.git
cd flowserv-flaskapp-pie
pip install -r requirements.txt

Configure and Setup Flowserv

The next step is to setup your local flowserv instance. The following will maintain all files in a subfolder .flowsev within the cloned repository. Start by setting the environment variables that configure flowserv.

export FLOWSERV_API_DIR=$PWD/.flowserv
export FLOWSERV_DATABASE=sqlite:///$FLOWSERV_API_DIR/flowserv.db

The next step is to initialize the flowserv database and install the PIE workflow template.

flowserv init -f
flowserv app install piesingle -k piesingle

Run The Web Server

After finishing the setup, make sure to set the following environment variables:

# Set the workflow identifier.
export FLOWSERV_APP=piesingle
# Context that Flask runs in. Defaults to `production` but here it is
# recommended to switch to the development environment.
export FLASK_ENV=development
export FLASK_APP=app

run flask

If you open the URL http://127.0.0.1:5000/ in your browser you should see the following screen:

Application Home Screen

To upload a colony image and run the analysis workflow go to http://127.0.0.1:5000/runs:

Workflow Run Submission Screen

The PIE repository contains sample images that can be uploaded when submitting a workflow run.

About

Flowserv Flask Application for PIE Project

License:MIT License


Languages

Language:HTML 74.5%Language:Python 22.1%Language:CSS 3.3%Language:JavaScript 0.1%