This repo is made to implement the 'FastAPI' example through a simple RNN model.
data: train/test data(csv file)
main.py: model(simple rnn) + serving(FastAPI) example code
simple-rnn-model.ipynb: kaggle notebook file (model train code using pytorch-lightning)
├── data │ ├── test.csv │ └── train.csv ├── models │ ├── rnn.ckpt │ └── vocab.pt ├── README.md ├── requirements.txt ├── simple-rnn-model.ipynb ├── src │ └── main.py
ex) python3 ./src/main.py
ex) uvicorn src.main:app --host=0.0.0.0 --port=9999
POST /recognition Request(JSON):
{
"text": "input string"
}
Response(JSON):
{
"result": "result string",
}
This is a text classification model using a simple LSTM structure.
A model that classifies whether it is a disaster or not based on input text.
Vocabulary is extracted from the torch script model.
Model training was conducted using kaggle notebook.
I used the 'FastAPI' web framework for torch model serving.