In this code:
We fetch data from a public API.
We preprocess each item to remove non-alphabetic characters and normalize the text.
We generate embeddings for the items using the Universal Sentence Encoder.
We create a FAISS index and add the item embeddings to it.
We define a function to perform searches based on user queries.
We provide an example query and display the top results along with their distances.
You can replace "search query" with any query you want to search for in real-time, making it easy to find the most relevant items