Skip to content

Commit

Permalink
Fixed issue with fasttext models
Browse files Browse the repository at this point in the history
  • Loading branch information
x-tabdeveloping committed Jan 24, 2024
1 parent 31d2a35 commit 0a015ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/seb/registered_models/fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

class FastTextModel(seb.Encoder):
def __init__(self, model_name: str, lang: str) -> None:
self.model_name = model_name
self.lang = lang
import fasttext
import fasttext.util

fasttext.util.download_model(self.lang, if_exists="ignore")
self.model = fasttext.load_model(self.model_name)
self.model_name = model_name
self.lang = lang

def get_embedding_dim(self) -> int:
v = self.encode(["get emb dim"])
Expand Down

0 comments on commit 0a015ba

Please sign in to comment.