Visualizing embeddings and semantic similarity with OpenAI and Nomic

Daniel Avila
LatinXinAI
Published in
4 min readAug 7, 2023

--

In this article, we will explore an example of visualizing semantic similarities in language input using OpenAI’s language models and Nomic’s visualization tools, all with the assistance of Streamlit.

You can review the complete code in the following file:

Also, try the Huggingface Space:

To run this project on your local machine, you can execute the code using the following command:

streamlit run app.py

Let’s go through the code

First, we are going to use a dataset of food reviews from Amazon in CSV format. This data includes columns like ‘ProductId’, ‘Score’, ‘Summary’, ‘Text’, ‘n_tokens’, and ‘embedding’ among others.

--

--