Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omchaithanyav/815403723d19cfbfa0bd250f26dee2b8 to your computer and use it in GitHub Desktop.
Save omchaithanyav/815403723d19cfbfa0bd250f26dee2b8 to your computer and use it in GitHub Desktop.
sentence = "this novel deserves a rating of 10"
tokens = Tokenizer.texts_to_sequences([sentence])
tokens = pad_sequences(tokens, maxlen = 6000)
prediction = model.predict(np.array(tokens))
pred = np.argmax(prediction)
classes = ['BookRestaurant','GetWeather','PlayMusic','RateBook']
classes[pred]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment