minor fixes and updates, removed spacy

This commit is contained in:
Alexander Karpov 2023-12-07 02:22:37 +03:00
parent 773fd2830e
commit 4dec3867ca
7 changed files with 303 additions and 1303 deletions

View File

@ -10,8 +10,8 @@ def extract_file_text(file: str) -> str:
try:
rawdata = open(file, "rb").read()
enc = chardet.detect(rawdata)
with open(file, encoding=enc["encoding"]) as file:
text = file.read()
with open(file, encoding=enc["encoding"]) as f:
text = f.read()
except Exception:
return ""

View File

@ -1,7 +1,7 @@
from config.celery_app import app
def get_scheduled_tasks_name() -> [str]:
def get_scheduled_tasks_name() -> list[str]:
i = app.control.inspect()
t = i.scheduled()
all_tasks = []

View File

@ -1,3 +0,0 @@
python -m spacy download en_core_web_lg
python -m spacy download xx_sent_ud_sm
python -m spacy download ru_core_news_lg

View File

@ -7,4 +7,4 @@ set -o nounset
python manage.py migrate auth
python manage.py migrate
python manage.py runserver_plus 0.0.0.0:8000
daphne config.asgi:application --port 8000 --bind 0.0.0.0

1593
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -95,8 +95,6 @@ yt-dlp = "^2023.7.6"
pytube = "^15.0.0"
urllib3 = ">=1.26"
requests = ">=2.25"
spacy = {extras = ["lookups"], version = "^3.6.1"}
spacy-transformers = "^1.2.5"
extract-msg = "0.28.7"
pytest-factoryboy = "2.3.1"
pytest-xdist = "^3.3.1"