Git Product home page Git Product logo

image-captioning's Introduction

smart-image-captioning

Predict caption from images and deploy the ML app on the cloud

Useful Links

Taxi Fare Prediction model Deployment Video

Link to Live Demo

Colab Notebook

Blog with instructions on the run (Coming Soon)

Description of the problem

The aim is to predict the captions of images using deep learning.

Model Trained

We used a pretrained GPT-2 model and deployed it as a webapp and a FastAPI endpoint using ServiceFoundry ๐Ÿš€

Instructions to deploy on ServiceFoundry

Setting up servicefoundry

Install and setup servicefoundry on your computer.

pip install servicefoundry

servicefoundry use server https://app.truefoundry.com

servicefoundry login
Deploying realtime inference
  1. Change working directory to predict folder

cd predict

  1. Create workspace and API key on the TrueFoundry platform

  2. Replace the MLF_API_KEY value predict.yaml file with the API Key found in secrets tab of your TrueFoundry account (Instructions here)

  3. Copy the workspace_fqn of the workspace that you want to use from the workspace tab of TrueFoundry(Instructions here) and add it in predict.yaml file

  4. To deploy using python script:


python predict_deploy.py

To deploy using CLI:


servicefoundry deploy --file predict/predict_deploy.yaml

  1. Click on the dashboard link in the terminal to open the service deployment page with FastAPI EndPoint
Querying the deployed model

This can done via the fastapi endpoint directly via browser.

Deploying Demo

Note: It is necessary to deploy live inference model before being able to deploy a demo

  1. Create workspace and API key on the TrueFoundry platform

  2. Replace the MLF_API_KEY value demo.yaml file with the API Key found in secrets tab of your TrueFoundry account (Instructions here)

  3. Copy the workspace_fqn of the workspace that you want to use from the workspace tab of TrueFoundry and add it in the demo.yaml file (Instructions here)

  4. To deploy using python script:


python demo/demo_deploy.py

To deploy using CLI:


servicefoundry deploy --file demo/demo_deploy.yaml

  1. Click on the dashboard link in the terminal
  2. Click on the "Endpoint" link on the dashboard to open the streamlit demo

image-captioning's People

Contributors

vishank97 avatar

Stargazers

Roman avatar

Watchers

 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.