Skip to content

windmaple/tfserving-web-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfserving-web-demo

A web example project to demo how to call TF Serving from a website

Usage

  1. Download the Inception v3 SavedModel from TFHub
  2. Start TF Serving with: docker run -t --rm -p 8501:8501 -v "/path/to/inception_v3/SavedModel/folder:/models/inception_v3" -e MODEL_NAME=inception_v3 tensorflow/serving
  3. If you are not running TF Serving on your local machine, by default many browser will block cross-origin request. So you need to disable CORS policy. For Chrome on Mac, this is the way to do it (only for development testing): open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

If you are not running TF Serving on your local machine, replace 'localhost' with your TF Serving host's IP address. You do not need to worry about CORS.

  1. Load tfserving-demo.html by directly using a brower or use a simple HTTP server

test image is from: https://github.com/tensorflow/models/tree/master/research/object_detection/test_images/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages