Create virtual environment version 3.11
On hal52: /usr/bin/python3.11 -m venv venv && source venv/bin/activate pip install --upgrade pip && pip install -r requirements.txt
A Flask application to view videos from plume detection runs, retrieving data from PostgreSQL.
-
Install dependencies:
pip install flask psycopg2-binary
-
Place jQuery in the static/js directory or update the template to use a CDN.
-
Make sure you have a PostgreSQL database named "smoke_detect" with a table "video_labels". The table should have the following schema:
CREATE TABLE video_labels ( id SERIAL PRIMARY KEY, run_name TEXT NOT NULL, video_url TEXT NOT NULL, metadata TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
-
Run the application:
python app.py
-
Access the application at:
http://localhost:5000/
app.py
: Main Flask application with PostgreSQL database accesstemplates/index.html
: Homepage showing available runstemplates/videos.html
: Page displaying videos for a specific runtemplates/error.html
: Error page for when runs are not foundstatic/js/
: JavaScript files (including jQuery)