Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter de Winter committed Apr 19, 2018
1 parent 811cb06 commit 8ce0a26
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
.ipynb_checkpoints
server/__pycache__
*.pyc
.env
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
environment:
FLASK_APP: server.py
FLASK_DEBUG: 1
REDIS_HOST: redis
command: ["source activate deeplearning && flask run --with-threads --host=0.0.0.0 --port=${HIVE_PORT:-5000}"]
worker:
build: .
Expand All @@ -22,6 +23,8 @@ services:
working_dir: "/opt/src"
links:
- redis
environment:
REDIS_HOST: redis
command: ["source activate deeplearning && python -u worker.py"]
redis:
image: redis
Expand Down
4 changes: 3 additions & 1 deletion server/Config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os

class Config:
REDIS_HOST = 'localhost'
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
IMAGE_SIZE = 128
IMAGE_PATH = 'data/128x128'
4 changes: 2 additions & 2 deletions server/static/bundle.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions simulate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 79,
"execution_count": 82,
"metadata": {},
"outputs": [
{
Expand All @@ -12,7 +12,7 @@
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n",
"Loading images ...\n",
"(1093, 256, 256, 3) (1093,)\n",
"(1093, 128, 128, 3) (1093,)\n",
"Loaded 1093 images\n"
]
}
Expand All @@ -24,12 +24,12 @@
"from server.HiveModel import HiveModel\n",
"import redis, json\n",
"\n",
"model = HiveModel(path='data/256x256', img_size=256)"
"model = HiveModel(path='data/128x128', img_size=128)"
]
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": 88,
"metadata": {
"collapsed": true
},
Expand Down

0 comments on commit 8ce0a26

Please sign in to comment.