Giter Site home page Giter Site logo

sg-hansard-nlp-api's Introduction

sg-hansard-nlp-api

About

API for the Singapore Hansard NLP Model to perform NER and Sentiment Analysis. The model can be downloaded from the releases page. The backend was built using FastAPI and deployed with Docker on Google Cloud Platform cloud run.

Set up Locally

  1. Clone Repo git clone https://github.com/nus-cs3244-ml-singapore-7/sg-hansard-nlp-api.git
  2. Change directory cd sg-hansard-nlp-api
  3. Download the models from releases and add it to the finetuned_models directory
  4. Install virtual environment virtualenv env
  5. Activate environment env\Scripts\activate
  6. Install requirements pip install -r requirements.txt
  7. Install pytorch cpu pip install torch==1.7.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
  8. Start the server uvicorn main:app --host 0.0.0.0 --port 8080

Deploy to Google Cloud Platform (GCP)

  1. Create docker image docker build -t <image_name>:<tag_name> .
  2. Login using gcloud CLI gcloud auth login
  3. Tag the image in the correct format for deployment docker tag <image_name>:<tag_name> gcr.io/<project_name>/<image_name>:<tag_name>
  4. Push to GCP container registry docker push gcr.io/<project_name>/<image_name>:<tag_name>
  5. Go to GCP container registry and deploy using cloud run

sg-hansard-nlp-api's People

Contributors

noelmathewisaac avatar

Watchers

James Cloos avatar Kingsley Kuan 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.