Alternative for TextList.from_df

Hello, I am looking for a solution for a multi label text classification where there are articles suggetsing there is a way to perform in fastai v1. can Anyone help me out how to build a datablock or alternative for the following code snippet.image

Hello @Anish_sri,

I had the same problem with a language model, the solution was to use TextDataLoaders.from_df

The documentation is here:

For you case you can try this:

data_clas = TextDataLoaders.from_df(train, path=path, text_col=‘comment_text’,label_col=label_cols, text_vocab=data.vocab, bs=32)

1 Like

Note : Example provided should use MultiCategoryBlock instead of MultiCategorize

This is extremely helpful!
Thank you so much
Would you suggest some rules to follow when converting from old notations (having TextList and DataBunches) to the new ones (DataBlocks and DataLoaders)