diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 548051825..4507f66c2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: name: Run unit tests strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] os: [ubuntu-latest, windows-latest] fail-fast: false runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 6e95999ca..0a094b100 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The following publications are integrated in this framework: ## Installation -We recommend **Python 3.6** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7. +We recommend **Python 3.8** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.23.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7. **Install with pip** diff --git a/docs/installation.md b/docs/installation.md index ababc1e81..9200c5123 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,6 +1,6 @@ # Installation -We recommend **Python 3.6** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7. +We recommend **Python 3.8** or higher, **[PyTorch 1.6.0](https://pytorch.org/get-started/locally/)** or higher and **[transformers v4.6.0](https://github.com/huggingface/transformers)** or higher. The code does **not** work with Python 2.7. diff --git a/examples/applications/image-search/README.md b/examples/applications/image-search/README.md index 40d7dada0..07f480c97 100644 --- a/examples/applications/image-search/README.md +++ b/examples/applications/image-search/README.md @@ -6,7 +6,7 @@ SentenceTransformers provides models that allow to embed images and text into th ## Installation -Ensure that you have [torchvision](https://pypi.org/project/torchvision/) installed to use the image-text-models and use a recent PyTorch version (tested with PyTorch 1.7.0). Image-Text-Models have been added with SentenceTransformers version 1.0.0. Image-Text-Models are still in an experimental phase. +Ensure that you have [transformers](https://pypi.org/project/transformers/) installed to use the image-text-models and use a recent PyTorch version (tested with PyTorch 1.7.0). Image-Text-Models have been added with SentenceTransformers version 1.0.0. Image-Text-Models are still in an experimental phase. ## Usage SentenceTransformers provides a wrapper for the [OpenAI CLIP Model](https://github.com/openai/CLIP), which was trained on a variety of (image, text)-pairs. diff --git a/index.rst b/index.rst index 74d559486..10b156d57 100644 --- a/index.rst +++ b/index.rst @@ -18,7 +18,7 @@ You can install it using pip: pip install -U sentence-transformers -We recommend **Python 3.6** or higher, and at least **PyTorch 1.6.0**. See `installation `_ for further installation options, especially if you want to use a GPU. +We recommend **Python 3.8** or higher, and at least **PyTorch 1.6.0**. See `installation `_ for further installation options, especially if you want to use a GPU. diff --git a/requirements.txt b/requirements.txt index 3d52c08e8..3196b6c2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,10 @@ transformers>=4.6.0,<5.0.0 tokenizers>=0.10.3 tqdm torch>=1.6.0 -torchvision numpy scikit-learn scipy nltk sentencepiece huggingface-hub +Pillow \ No newline at end of file diff --git a/sentence_transformers/SentenceTransformer.py b/sentence_transformers/SentenceTransformer.py index 8b8145e82..361e3f434 100644 --- a/sentence_transformers/SentenceTransformer.py +++ b/sentence_transformers/SentenceTransformer.py @@ -5,11 +5,7 @@ import stat from collections import OrderedDict import warnings -from typing import List, Dict, Tuple, Iterable, Type, Union, Callable, Optional -try: - from typing import Literal -except ImportError: - from typing_extensions import Literal +from typing import List, Dict, Tuple, Iterable, Type, Union, Callable, Optional, Literal import numpy as np from numpy import ndarray import transformers diff --git a/setup.py b/setup.py index 995727a71..baff91e65 100644 --- a/setup.py +++ b/setup.py @@ -17,24 +17,24 @@ url="https://www.SBERT.net", download_url="https://github.com/UKPLab/sentence-transformers/", packages=find_packages(), - python_requires=">=3.6.0", + python_requires=">=3.8.0", install_requires=[ 'transformers>=4.6.0,<5.0.0', 'tqdm', 'torch>=1.6.0', - 'torchvision', 'numpy', 'scikit-learn', 'scipy', 'nltk', 'sentencepiece', - 'huggingface-hub>=0.4.0' + 'huggingface-hub>=0.4.0', + 'Pillow' ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], keywords="Transformer Networks BERT XLNet sentence embedding PyTorch NLP deep learning"