- Notifications
You must be signed in to change notification settings - Fork0
Deploying sentiment analysis server with FastAPI and BERT
License
NotificationsYou must be signed in to change notification settings
izuna385/Japanese-BERT-Sentiment-Analyzer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- twitterデータセットを用いたポジ/ネガ/中性の判定モデル
鈴木研ホームページ よりデータセットを利用させて頂いています。
./dataset/
を詳しくは御覧ください。
$condacreate-nallennlppython=3.7$condaactivateallennlp$pipinstall-rrequirements.txt
$ python3 train.py
ここまでで、訓練されたモデルのパラメータが./serialization_dir/
下に保存される
$ docker build -t jsa:latest .$ docker run -d -itd -p 8000:8000 jsa
(コンテナ化しない場合)
$ uvicorn app:app --reload --port 8000 --host 0.0.0.0 --log-level trace
$ curl -X 'POST' 'http://localhost:8000/sentiment/' -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "sentence": "今日はいい天気" }'>> {"probs": { "neutral":0.8089876174926758, "negative":0.015650086104869843, "positive":0.17536230385303497 } }
About
Deploying sentiment analysis server with FastAPI and BERT
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published