impresso-floret-langident / impresso_langident_wrapper.py
Simon Clematide
Add Floret language identifier wrapper
b99687f
raw
history blame contribute delete
275 Bytes
import floret # Assuming Floret is already installed
class FloretLangIdentifier:
def __init__(self, model_path):
self.model = floret.load_model(model_path)
def predict(self, text):
predictions = self.model.predict(text)
return predictions