AutoTrain documentation

Text Classification

You are viewing pr_128 version. A newer version undefined is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Text Classification

Training a text classification model with AutoTrain is super-easy! Get your data ready in proper format and then with just a few clicks, your state-of-the-art model will be ready to be used in production.

Data Format

Let’s train a model for classifying the sentiment of a movie review. The data should be in the following CSV format:

review,sentiment
"this movie is great",positive
"this movie is bad",negative
.
.
.

As you can see, we have two columns in the CSV file. One column is the text and the other is the label. The label can be any string. In this example, we have two labels: positive and negative. You can have as many labels as you want.

Training

Once you have duplicated the AutoTrain Advanced space, you can start training your model. Please always factory reset the space to make sure your have the latest version of the AutoTrain Advanced.