Reg Response,I tried your code , according to your statement, now it’s trained but I didn’t get…
kanth bandari

kanth, you successfully built the text classification model (part 1 of the tutorial), nice work!

Have a look at the end of the notebook and you’ll see a way to quickly test your model:


You will see a prediction for the sentence “is your shop open today?”, with:

[[0.01907932758331299, 1.0800805583244255e-08, 0.0016339969588443637, 1.445684461032215e-09, 0.6044806838035583, 1.0841611128853401e-06, 2.067307436348642e-09, 6.506108093162766e-06, 0.37479835748672485]]

which points to the correct class listed also in your output, specifically the 5'th floating point value (0.604…) maps to the 5'th class ‘opentoday’

['goodbye', 'greeting', 'hours', 'mopeds', 'opentoday', 'payments', 'rental', 'thanks', 'today']

And the last line:

pickle.dump( {‘words’:words, ‘classes’:classes, ‘train_x’:train_x, ‘train_y’:train_y}, open( “training_data”, “wb” ) )

Which is necessary to move on to the next notebook.

Once you’ve save (‘pickled’) your model, continue to part 2 to see chat-bot responses. I encourage you to study the output in the notebooks carefully, sometimes there are extra lines that go further than the tutorial.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.