chore: Update Docker build platforms for application and frontend and optimised embedding import

This commit is contained in:
Alex
2024-05-18 12:10:24 +01:00
parent 4534cafd3f
commit 5c8133a810
6 changed files with 14 additions and 20 deletions

View File

@@ -4,7 +4,6 @@ import string
import zipfile
from urllib.parse import urljoin
import nltk
import requests
from application.core.settings import settings
@@ -14,13 +13,6 @@ from application.parser.open_ai_func import call_openai_api
from application.parser.schema.base import Document
from application.parser.token_func import group_split
try:
nltk.download("punkt", quiet=True)
nltk.download("averaged_perceptron_tagger", quiet=True)
except FileExistsError:
pass
# Define a function to extract metadata from a given filename.
def metadata_from_filename(title):
store = "/".join(title.split("/")[1:3])