pascalesdedy / rails-tensorflow-image-recog-demo

A full-stack demo, based at Ruby-on-Rails, gRPC and tensorflow, which shows how Google's machine-learning features can be called from any Web client directly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo project created by Xiaozhong Hua (Jim)

This is a demo project, based at Ruby-on-Rails, gRPC and tensorflow. The prototype wants to show how Google's AI features can be called from any Web client directly.

Setup & Run

  • You need to be sure that Ruby-on-Rails and tensorflow work at your machine. If they aren't done for you, please refer to: http://guides.rubyonrails.org/getting_started.html and https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html.

  • Git clone the repository to your local site.

  • cd rails-tensorflow-image-recog-demo.

  • Add your server ip address into config/environment/developments.rb:

    • config.server_ip = your_server_ip_address (it is 192.168.0.3, on my case)
    • Add it into production.rb and test.rb if you need, as well.
  • Open a console then input:

    • bin/setup
    • It stops with displaying "== Restarting application server =="
  • Open another console and input: bin/rails s -b your_server_ip_address

    • (on my case, it is 192.168.0.3)
  • Open a browser: [http://your_server_ip_address:3000]

    • (the address is 192.168.0.3, on my case).
    • Press "Welcome to My AI system".
  • Download some pictures from internet into a folder at your device.

    • Press "Choose File", go to the folder your pictures is stored, select a picture, press "Open".
    • Press "Recognizing".
    • Wait for a while, you shall see a page that the AI system shows back to you as: rails-tensorflow-image-recog-demo

Got reference from

About

A full-stack demo, based at Ruby-on-Rails, gRPC and tensorflow, which shows how Google's machine-learning features can be called from any Web client directly


Languages

Language:Ruby 93.8%Language:HTML 4.6%Language:JavaScript 0.9%Language:CSS 0.7%Language:CoffeeScript 0.2%