Multi-Class Text Classification with a GPT3 Transformer block: An End-to-End Example
Author:Murat Karakaya & Cansen Çağlayan Date created: 05 Oct 2021 Last modified: 19 Oct 2021 Description: This tutorial has 2 parts as explained below. Part A: Data Analysis & Text Preprocessing and Part B: Text Classification.
In this tutorial, we will download a Kaggle Dataset in which there are 32 topics and more than 400K total reviews. We will use this dataset for a multi-class text classification task.
Our main aim is to learn how to effectively use the Keras TextVectorization layer in Text Processing and Text Classification.
The tutorial has 5 parts:
PART A: BACKGROUND
PART B: KNOW THE DATA
PART C: USE KERAS TEXT VECTORIZATION LAYER
PART D: BUILD AN END-TO-END MODEL
PART E: DEPLOY END-TO-END MODEL TO HUGGINGFACE SPACES USING GRADIO
SUMMARY
At the end of this tutorial, we will cover:
What a Keras TextVectorization layer is
Why we need to use a Keras TextVectorization layer in Natural Language Processing (NLP) tasks
How to employ a Keras TextVectorization layer in Text Preprocessing
How to integrate a Keras TextVectorization layer to a trained model
How to save and load a Keras TextVectorization layer and a model with a Keras TextVectorization layer
How to integrate a Keras TextVectorization layer with TensorFlow Data Pipeline API (tf.data)
How to design, train, save, and load an End-to-End model using Keras TextVectorization layer
How to deploy the End-to-End model with a Keras TextVectorization layer implemented with a custom standardize (custom_standardization) function using the Gradio library and the HuggingFace Spaces