This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| graph = tf.Graph() | |
| with graph.as_default(): | |
| # input of every mini-batch training data | |
| tf_train_X = tf.placeholder(tf.float32, name='tf_train_X', | |
| shape=(batch_size, image_size, image_size, input_depth)) | |
| tf_train_y = tf.placeholder(tf.float32, name='tf_train_y', | |
| shape=(batch_size, 1)) | |
| # input for every single realtime prediction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # make directory for tensorboard logging | |
| >>cd /tmp | |
| >>mkdir -p tensorboard/cat-recognizer | |
| # go back to cat-recognizer project | |
| >>cd ~/Documents/Code/cat-recognition-app/ | |
| # tell tensorboard to read log from the directory | |
| >>tensorboard --logdir=/tmp/tensorboard/cat-recognizer/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| from __future__ import print_function | |
| from __future__ import unicode_literals | |
| import os | |
| import json | |
| import boto3 | |
| import logging | |
| import gspread | |
| from oauth2client.service_account import ServiceAccountCredentials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - Procfile | |
| - runtime.txt | |
| - requirements.txt | |
| # get new heroku app | |
| heroku create | |
| $Creating app... done, ⬢ damp-anchorage-60936 # --> 複製ID | |
| heroku git:remote -a damp-anchorage-60936 | |
| git add . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install heroku/brew/heroku |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install awscli --upgrade | |
| aws configure --profile personal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # References | |
| # https://stackoverflow.com/questions/9166400/convert-rgba-png-to-rgb-with-pil | |
| from PIL import Image | |
| def get_rgb_image(file_path, delete_original_image=True): | |
| """ | |
| Remove image's alpha channel and return the path of the | |
| transformed image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://gist.github.com/<hash>.git | |
| git add your-image.jpg | |
| git commit -m "Add image" | |
| git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| References | |
| - https://stackoverflow.com/questions/24383700/resize-image-in-the-wiki-of-github-using-markdown | |
| <img src="images/cover.png" alt="Cover" width="50%"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="row"> | |
| <div class="col-md-6"> | |
| <div> | |
| <img src="{{cur_image_path}}" class="img-responsive"> | |
| </div> | |
| </div> | |
| </div> |