https://github.com/owencooke/outageml
A power outage management web app that prioritizes emergency responses using AI. 🥈 @ APIC Energy Hackathon 2023
https://github.com/owencooke/outageml
django outages postgres pytorch react
Last synced: about 2 months ago
JSON representation
A power outage management web app that prioritizes emergency responses using AI. 🥈 @ APIC Energy Hackathon 2023
- Host: GitHub
- URL: https://github.com/owencooke/outageml
- Owner: owencooke
- License: mit
- Created: 2023-04-29T15:13:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-17T05:06:03.000Z (almost 3 years ago)
- Last Synced: 2025-06-07T00:06:37.879Z (12 months ago)
- Topics: django, outages, postgres, pytorch, react
- Language: Python
- Homepage:
- Size: 411 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OutageML
https://user-images.githubusercontent.com/83478026/235809636-30e9a382-2c49-4c62-95e2-e0b854d06f58.mov
## Won 2nd Place at the 2023 APIC Energy Hackathon 🎉

### Frontend
- React (frontend framework)
- Create React App (support for TSX, ES6, TypeScript, no need to install bundler, ...etc)
- Leaflet.js
- Tailwind CSS
### Backend
- Python3 (backend language)
- Poetry (Python dependency management system)
- Black (formatter)
- Psycopg2 (PostgreSQL adapter for Python)
- Python-decouple (to get env file content)
- Django (backend framework)
- Django REST Framework (Django's toolkit for building Web APIs)
- PostgreSQL (database)
- PyTorch
## Getting Started
Clone this repository to your local machine:
```bash
git clone git@github.com:owencooke/OutageML.git
```
### To run the client
In the project folder,
```bash
cd client
npm i && npm run dev
```
### To run the server
#### Django and PostgreSQL
Need to be on UNIX environment
You first need to have [PostgreSQL](https://www.postgresql.org/download/) installed and running, and create a user and a database. Afterwards, create `./server/.env` file to store your database information along with some Django settings. It should have values for all the following keys:
##### `./server/.env` file
```python
SECRET_KEY =
DEBUG = True # set to False in production
DB_NAME =
DB_USER =
DB_PASSWORD =
DB_HOST = localhost # set to your domain name in production
DB_PORT = 5432 # default postgreSQL port
```
#### Poetry
In addition to the database, you need to setup the Python environment. We use [poetry](https://python-poetry.org/docs/#installation) for dependency management, so poetry needs to be installed first. Once installed, in the project folder,
```bash
$ poetry shell # this should create a virtualenv for you at .venv and start using it
$ poetry install
$ cd server
$ python manage.py migrate # make sure your selected Python interpreter is the one in .venv
$ python manage.py runserver
```