Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Here we combine both lists into a single set of unique phrases
messages = set(df_404s["phrase"].to_list() + df_canonicals["phrase"].to_list())
messages = list(messages)[:-1]
similarity_input_placeholder = tf.placeholder(tf.string, shape=(None))
similarity_message_encodings = embed(similarity_input_placeholder)
with tf.Session() as session:
session.run(tf.global_variables_initializer())
session.run(tf.tables_initializer())
# We are truncating the messages list to 15 to simplify the visualization
run_and_plot(session, similarity_input_placeholder, messages[:15],
similarity_message_encodings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.