Hi all. I am trying to see if I can use a model I’ve trained on a column of a dataframe. The idea is that I’d append the predicted classification from the model to the dataframe where the text originated (so each row would have the raw text with the prediction).
So far I’ve done this:
learner = load_learner(’/MyPathBarrettsModel.pkl’, “BarrettsModel.pkl”)
df_loadNew = pd.read_csv(’/MyOriginaalText.csv’)
df_loadNew.columns = [‘text’]
The part I’m getting stuck at is here:
How do I convert the pred_class to a classification label and append to the original dataframe?