Skip to content

This module is a part of the app, which I was in charge, and created at a hackathon "【IoTLT初!】AIoTLTハッカソン - データを集めてAIを作ってみよう". The event page is below. https://iotlt.connpass.com/event/103011/

Notifications You must be signed in to change notification settings

Masao-Taketani/text_classification_with_alexa

Repository files navigation

text_classification_with_alexa(Chatty Kanna👧🏻)

Overview

This Machine Learning module classifies categories of text input. It can also handle speech input using an Amazon Alexa together. The diagram of the architecture is as follows. architecture You can deploy this module in a server or a local PC. It takes JSON requests first, which includes text message, and then process the data to classify categories of the input text. After predicting the category of the input text, it responds with JSON, which contains the predicted category.

How to train a ML model and deploy it

  1. Test tfidf.py.
$ python tfidf.py
  1. Create pickle files for data and dictionaries.
$ python make_pkl_for_data_and_dic.py

Executing the above command, you will create two pickle files data.pkl and dic.pkl in data/pkl directory.

  1. Train a ML model by using Multilayer Perceptron(MLP) algorithms.
$ python train_mlp.py

You will save the weights(parameters) of the model genre-model.hdf5 in data/weights directory after training.

  1. Test the trained model.
$ python prdict_using_mlp.py
  1. Deploy the model as a WebAPI.
$ python webapi.py

About

This module is a part of the app, which I was in charge, and created at a hackathon "【IoTLT初!】AIoTLTハッカソン - データを集めてAIを作ってみよう". The event page is below. https://iotlt.connpass.com/event/103011/

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published