Giter Club home page Giter Club logo

dimsum_classifier_fastai_cloud_run's Introduction

Dim Sum Image Classification App with fast.ai models on Google Cloud Run

This repo contains a version of the web app for classifying dim sum that can be deployed to Google Cloud Run. It supports 5 dim sum types currently.


Deploy with Google Cloud Run

Pre-requisites

  • Google Cloud Account
  • Enable Cloud Run and Cloud Build API

Deploy

To run the webapp on Google Cloud Run, launch Cloud Shell from your Dashboard.

  • export PROJECT_ID={your project id here}
  • Run gcloud config set project $PROJECT_ID
  • Run git clone https://github.com/yoke2/dimsum_classifier_fastai_cloud_run.git
  • Change directory: cd dimsum_classifier_fastai_cloud_run
  • Build container image with Google Cloud Build by running gcloud builds submit --tag gcr.io/$PROJECT_ID/dimsumapp
    • If prompted that Cloud Build API not enabled on the project, enter 'y' to enable and retry
  • Deploy container built: gcloud run deploy --image gcr.io/$PROJECT_ID/dimsumapp --platform managed --allow-unauthenticated --memory 512M
    • You will be prompted for the service name: press Enter to accept the default name
    • You will be prompted for region: select the region us-central1
  • You will receive an URL to access the app. This can be seen on the Cloud Run page for dimsumapp in the Dashboard as well

Docker Installation

You can test your changes locally by installing Docker and using the following command:

docker build -t dimsum-fastai-v3-cr . && docker run --rm -it -p 5000:5000 dimsum-fastai-v3-cr

Local Installation

  • Install dependencies
$ pip install -r requirements.txt

Run app

$ python app/server.py serve

Reference

dimsum_classifier_fastai_cloud_run's People

Contributors

yoke2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.