https://github.com/mideind/nnserver
Neural Network Middleware Server
https://github.com/mideind/nnserver
Last synced: about 1 month ago
JSON representation
Neural Network Middleware Server
- Host: GitHub
- URL: https://github.com/mideind/nnserver
- Owner: mideind
- License: gpl-3.0
- Created: 2019-08-23T18:24:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T01:44:26.000Z (about 3 years ago)
- Last Synced: 2025-01-26T03:08:12.803Z (over 1 year ago)
- Language: Python
- Size: 306 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Baseline In NMT for English--Icelandic
The MIT License (MIT)
Copyright (c) 2020 Miðeind ehf
## Disclaimer
This repository contains code to serve models trained with the [GreynirT2T](https://github.com/mideind/GreynirT2T) pipeline for NMT, it is no loner maintained since its core Tensor2Tensor has been de facto abandoned. See the repoository [GreynirSeq](https://github.com/mideind/GreynirSeq) for future development on NMT for Icelandic.
## Models
For serving with docker, store models under `conf/models/`. The baseline models available on [CLARIN](https://repository.clarin.is/repository/xmlui/) are trained on a cleaned up and filtered variation of ParIce along with backtranslation data. One model for each direction English--Icelandic and Icelandic--English.
## Serve models over http
### Simple setup
Having installed docker and docker-compose, run
```bash
docker-compose up
```
and you will be able to query a translation server for translations from Icelandic to English and vice versa using e.g. curl in the following manner:
```bash
curl -X POST -H "Content-Type: application/json" -d '{"model": "transformer-bt", "target": "en", "source": "is", "pgs": ["Hvað er klukkan?"]}' localhost:5005/translate.api
```
witch returns
```
[{"batch_prediction_key":[0],"outputs":"What time is it?","scores":-0.642857373}]
```
### In production
To serve this in production a proper webserver such as nginx should be set up as a proxy and https used since sensitive data might be translated.