This repository contains the code useful to publish a web API to input and predict the class of a text. The input text will be fed to a pretrained model, deployed in tensorflowjs.
- Backend:
- v1. Flask (I know that TFJS supports node now but for the sake of suitable preprocessing it's in python).
- v2. Python
- Preprocessing: conversion of text in sequences.
- Frontend: tensorflowjs (I have a script in head from cdn, made for python developers in order not to download a module).
Model deployed in a tensorflowjs format.
Simply open the webpage. Input a text and press predict.
p.s. This repository served as the base for this Medium post. I refer to that for a detailed explanation of both model and website structure.