Skip to content

CYang828/dl-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

快速开始

  1. 克隆本项目
git clone https://github.com/BSlience/dl-deploy.git
  1. 安装依赖包
pip install -r requirements.txt
  1. 下载部署中使用的模型,并确保放在 assets 目录下
wget http://aimaksen.bslience.cn/torch-bert-sentiment.bin -P assets/
  1. 启动服务
uvicorn sentiment_analyzer.api:app
  1. 测试服务

先安装 HTTPie,然后运行下面命令

# other console
http POST http://localhost:8000/predict text="OMG. I love how easy it is to stick to my schedule. Would recommend to everyone"
{
    "confidence": 0.9999295473098755,
    "probabilities": {
        "negative": 1.7753758584149182e-05,
        "neutral": 5.275019793771207e-05,
        "positive": 0.9999295473098755
    },
    "sentiment": "positive"
}

About

深度学习模型部署

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages