Spaces:
Runtime error
Runtime error
freemt
commited on
Commit
·
f88c21c
1
Parent(s):
72eb4f9
Update workflows to include pip install sentence-transformers
Browse files
.github/workflows/routine-tests.yml
CHANGED
|
@@ -21,7 +21,9 @@ jobs:
|
|
| 21 |
with:
|
| 22 |
poetry-version: ${{ matrix.poetry-version }}
|
| 23 |
- name: Install packages
|
| 24 |
-
run:
|
|
|
|
|
|
|
| 25 |
- name: Run flake8
|
| 26 |
run: |
|
| 27 |
poetry run flake8 --exit-zero
|
|
|
|
| 21 |
with:
|
| 22 |
poetry-version: ${{ matrix.poetry-version }}
|
| 23 |
- name: Install packages
|
| 24 |
+
run: |
|
| 25 |
+
poetry install # --no-dev
|
| 26 |
+
poetry run pip install sentence-transformers
|
| 27 |
- name: Run flake8
|
| 28 |
run: |
|
| 29 |
poetry run flake8 --exit-zero
|
radio_embed/radio_embed.py
CHANGED
|
@@ -15,7 +15,7 @@ def radio_embed(
|
|
| 15 |
) -> numpy.ndarray:
|
| 16 |
"""Embed input."""
|
| 17 |
try:
|
| 18 |
-
_ = model.encode(text.splitlines())
|
| 19 |
except Exception as _:
|
| 20 |
logger.exception(_)
|
| 21 |
raise
|
|
|
|
| 15 |
) -> numpy.ndarray:
|
| 16 |
"""Embed input."""
|
| 17 |
try:
|
| 18 |
+
_ = model.encode(text.strip().splitlines())
|
| 19 |
except Exception as _:
|
| 20 |
logger.exception(_)
|
| 21 |
raise
|