Skip to content
/ NLP-API Public template

A python server that provides NLP-related APIs.

License

Notifications You must be signed in to change notification settings

rerender2021/NLP-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a NLP API server.

Usage

  • Download it from release

  • Unzip it, and click run.bat

run-from-cmd

API

  • Default host: http://localhost:8100

POST /translate

  • Description: offline translation
  • Example:

api-translate

Dev

  • Install
> virtualenv venv --python=python3.8.10
> pip install -r requirements.txt
  • Download model
> python ./script/download.py

Then, adjust model folder structure like this:

- ...
- model
    - opus-mt-en-zh
- ...
- README.md
  • Run
> python ./src/main.py

Package

> build

License

MIT