GithubHelp home page GithubHelp logo

oppiesystems / short-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 52 KB

Domain-specific content summarization API (NLP / Skip Thoughts)

Home Page: https://short.oppie.io

Python 80.16% Shell 9.05% Dockerfile 10.79%
nlp skip-thought-vectors

short-api's Introduction

short-api

Domain-specific content summarization API.

Development

Development Prerequisites

npm run preinstall

--or--

virtualenv .
source bin/activate
pip install -r requirements.txt
python -c 'import nltk; nltk.download("punkt")'

Download models manually (Optional)

# Approximately 3gb download
mkdir models
wget -P ./models http://www.cs.toronto.edu/~rkiros/models/dictionary.txt

Run

npm start

--or--

python main.py

Test

Unit Test

Execute the following command to run the unit test package for the project.

npm test

--or--

python -m unittest -v test # Verbose

API

POST /digest

curl --header "Content-Type: application/json" \
  --request POST \
  -d @test/post_data.json \
  http://0.0.0.0:5900/api/digest

Deployment

Local Docker

Build image

docker build -t breef:latest .

Run image

docker-compose up

Stop the container

Removes volumes when brought down

docker-compose down --volumes

Google Cloud Platform

GCP Prerequisites

gcloud auth configure-docker

Build and deploy GCP image

yarn run deploy

Run the GCP Image

docker run gcr.io/breef-247014/breef-image

Additional Docker Commands

Tail Logs

docker logs -f breef_app

Execute Command in Container

docker exec -t -i breef <COMMAND>

docker exec -t -i breef_app ls models

Mount Remote Models Locally

sudo mkdir -m 777 -p /mnt/models && gcsfuse --foreground -o nonempty breef-models /mnt/models

short-api's People

Contributors

patmigliaccio 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.