Skip to content

Commit

Permalink
Remove commented lines, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
computermacgyver committed Sep 25, 2024
1 parent 7419078 commit cb06557
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions app/main/lib/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

from app.main.lib.language_analyzers import SUPPORTED_LANGUAGES
from app.main.lib.error_log import ErrorLog
#from app.main.lib.langid import Cld3LangidProvider as LangidProvider
#from app.main.lib.langid import GoogleLangidProvider as LangidProvider
from app.main.lib.langid import FastTextLangidProvider as LangidProvider

def get_all_documents_matching_context(context):
Expand Down
2 changes: 1 addition & 1 deletion app/main/lib/langid.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class FastTextLangidProvider:
@staticmethod
def langid(text):
prediction = FastTextLangidProvider.fasttext_model.predict(text)
# prediction is a list of tupples, e.g., (('__label__en',), array([0.22517213]))
# prediction is a list of tuples, e.g., (('__label__en',), array([0.22517213]))
return {
'result': {
'language': prediction[0][0].split("__")[-1],
Expand Down
2 changes: 0 additions & 2 deletions app/main/lib/text_similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from app.main.lib import elastic_crud
from app.main.lib.shared_models.shared_model import SharedModel
from app.main.lib.language_analyzers import SUPPORTED_LANGUAGES
#from app.main.lib.langid import Cld3LangidProvider as LangidProvider
#from app.main.lib.langid import GoogleLangidProvider as LangidProvider
from app.main.lib.langid import FastTextLangidProvider as LangidProvider
from app.main.lib.openai import retrieve_openai_embeddings, PREFIX_OPENAI
ELASTICSEARCH_DEFAULT_LIMIT = 10000
Expand Down

0 comments on commit cb06557

Please sign in to comment.