This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new e1c700c277a solr/example/films/vectors/README.md tweaks (#2121)
e1c700c277a is described below
commit e1c700c277a8c69f789e35ec03a8d955e0a930ef
Author: Christine Poerschke <[email protected]>
AuthorDate: Thu Dec 7 11:12:36 2023 +0000
solr/example/films/vectors/README.md tweaks (#2121)
---
solr/example/films/vectors/README.md | 6 ++++++
solr/example/films/vectors/films.py | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/solr/example/films/vectors/README.md
b/solr/example/films/vectors/README.md
index 5a2a7c01751..0145ac0994e 100644
--- a/solr/example/films/vectors/README.md
+++ b/solr/example/films/vectors/README.md
@@ -23,6 +23,12 @@ We present in this directory the Python scripts that were
used to create the `fi
To replicate the example you have to run the `create_model.py` script first,
followed by `create_dataset.py`. We will describe and discuss each of these
scripts below.
+## Setup
+
+```
+pip install sentence-transformers
+```
+
## Creating the Model (`create_model.py`)
There are several approaches that one could use to create vectors (embeddings)
to represent documents. In the case of our example we decided to use a
_textual_ approach, where we use the text of the document as input for
calculating its vector.
diff --git a/solr/example/films/vectors/films.py
b/solr/example/films/vectors/films.py
index 72947c01860..cd1a712eb39 100644
--- a/solr/example/films/vectors/films.py
+++ b/solr/example/films/vectors/films.py
@@ -20,7 +20,7 @@ import csv
from lxml import etree
from sentence_transformers import SentenceTransformer
-PATH_FILMS_DATASET = "./data/films.json"
+PATH_FILMS_DATASET = "../films.json"
PATH_FILMS_MODEL = "./models/films-model-size_10"
PATH_FILMS_VECTORS_JSON = "./data/films-vectors.json"
PATH_FILMS_VECTORS_XML = "./data/films-vectors.xml"