# custom function to have fun def my_predictions(my_sentence, model): all_categories_names = np.array(data.target_names) prediction = model.predict([my_sentence]) return all_categories_names[prediction]