https://github.com/alexander-ding/nn-flowchart
Define and train simple neural networks with a drag-and-drop UI
https://github.com/alexander-ding/nn-flowchart
postgresql python reactjs
Last synced: 3 months ago
JSON representation
Define and train simple neural networks with a drag-and-drop UI
- Host: GitHub
- URL: https://github.com/alexander-ding/nn-flowchart
- Owner: alexander-ding
- Created: 2019-04-11T12:40:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T20:33:38.000Z (about 3 years ago)
- Last Synced: 2025-02-07T17:31:45.041Z (over 1 year ago)
- Topics: postgresql, python, reactjs
- Language: JavaScript
- Homepage: https://ading.dev/nn-flowchart/
- Size: 3.11 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Neural Net Flowchart
An in-browser playground to rapidly experiment with simple neural network architectures.
## Features
- Use the simple drag-and-drop UI to define neural network architecture
- Train and test in the browser with Tensorflow.js
- Save your model and share the permalink
- Download your model as a Tensorflow.js JSON file
## Getting Started
This codebase uses two servers: a Flask server for the backend API and a React-based frontend (which, after it is built, can be deployed by any static server).
### For the Frontend (assuming Mac OS)
First install `homebrew`.
```Bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
Then use it to install `NodeJS`.
```Bash
brew install node
```
Go install all the dependencies via
```Bash
npm install
```
Finally, go make a production build, which bundles together the frontend code into one `/build` folder to be served by the server.
```Bash
npm run build
```
To serve the build, install
```Bash
npm i serve
serve -s build
```
Or use your preferred static server.
Now you're all set for the frontend.
### For the Backend
Setup an SQL server and create a database. Then go to `config.py` to setup the SQL login.
For example, for Postgres,
```Python
SQLALCHEMY_DATABASE_URI = "postgresql://{login}:{password}@{database_url}/{tablename}"
```
Now we install the Python dependencies:
```Bash
pip install -r requirements.txt
```
One last thing, be sure to migrate the database (see below). Run `python run.py` to start the server.
Then go `serve -s build` to serve the frontend. Things should be working now.
## Migrate Database
If the directory `server/migrations` does not exist, run
```Bash
python migrate.py db init
```
and complete the following.
Every time the SQL database structure is updated in the Python code, run the following code in order to update the SQL server.
```Bash
python migrate.py db migrate
python migrate.py db upgrade
```