Member-only story
Getting started with Sentence Transformers in Poetry
Sentence Transformers is a Python framework for state-of-the-art sentence, text and image embeddings. In this post we going to set our local machine up and ready to use Sentence transformers, using Poetry.
Poetry is a tool for dependency management and packaging in Python. if you didn’t yet used it, give it a try, you will love it, specially if like you are coming from a NPM world! I wrote a post about how to install Poetry and if you don’t have it yet, please go ahead and install it and get back to continue our journey with Sentence Transformers.
1 — Create a new Poetry project
Let’s start with a new Poetry project, go ahead and run the following
poetry new try-sentence-transformers
This will create a Poetry project with the following structure
try-sentence-transformers
├── pyproject.toml
├── README.md
├── try_sentence_transformers
│ └── __init__.py
└── tests
└── __init__.py
Now, in try_sentence_transformers
folder let’s create a new file and call it main.py
. This going the be the main file where we will use to write python code later on.