Skip to content

Instantly share code, notes, and snippets.

@sararob
Last active August 14, 2018 18:30
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 sararob/18406619f40d2027379d10090bbcb473 to your computer and use it in GitHub Desktop.
Save sararob/18406619f40d2027379d10090bbcb473 to your computer and use it in GitHub Desktop.
for movie_genres in results:
top_2 = movie_genres['probabilities'].argsort()[-2:][::-1]
for genre in top_2:
text_genre = encoder.classes_[genre]
print(text_genre + ': ' + str(round(movie_genres['probabilities'][genre] * 100, 2)) + '%')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment