- Takes an Unstructured open-source library-generated JSON file as input.
- Reads in the JSON file’s contents as a JSON object.
- Uses the sentence-transformers/all-MiniLM-L6-v2
model on Hugging Face to generate embeddings for each
text
field of each document element in the JSON file. - Adds the generated embeddings next to each corresponding
text
field in the original JSON. - Saves the results back to the original JSON file.
Python