serialized fastText embeddings (see last section of this readme or
these instructions
)
Run with one line of code
After installing
multi2convai
and locally available fastText embeddings you can run:
# assumes working dir is the root of the cloned multi2convai repo
python scripts/run_inference.py -m multi2convai-quality-it-logreg-ft
>>> Create pipeline for config: multi2convai-quality-it-logreg-ft.
>>> Created a LogisticRegressionFasttextPipeline for domain: 'quality' and language 'it'.
>>>
>>> Enter your text (type'stop' to end execution): Avviare il programma
>>> 'Avviare il programma' was classified as 'neo.start' (confidence: 0.8943)
How to run model using multi2convai
After installing
multi2convai
and locally available fastText embeddings you can run:
# assumes working dir is the root of the cloned multi2convai repofrom pathlib import Path
from multi2convai.pipelines.inference.base import ClassificationConfig
from multi2convai.pipelines.inference.logistic_regression_fasttext import (
LogisticRegressionFasttextConfig,
LogisticRegressionFasttextPipeline,
)
language = "it"
domain = "quality"# 1. Define paths of model, label dict and embeddings
model_file = "model.pth"
label_dict_file = "label_dict.json"
embedding_path = Path(
f"../models/embeddings/fasttext/it/wiki.200k.it.embed"
)
vocabulary_path = Path(
f"../models/embeddings/fasttext/it/wiki.200k.it.vocab"
)
# 2. Create and setup pipeline
model_config = LogisticRegressionFasttextConfig(
model_file, embedding_path, vocabulary_path
)
config = ClassificationConfig(language, domain, label_dict_file, model_config)
pipeline = LogisticRegressionFasttextPipeline(config)
pipeline.setup()
# 3. Run intent classification on a text of your choice
label = pipeline.run("Avviare il programma")
label
>>> Label(string='neo.start', ratio='0.8943')
Download and serialize fastText
# assumes working dir is the root of the cloned multi2convai repomkdir models/fasttext/it
curl https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.it.vec --output models/fasttext/it/wiki.it.vec
python scripts/serialize_fasttext.py -r fasttext/wiki.it.vec -v fasttext/it/wiki.200k.it.vocab -e fasttext/it/wiki.200k.it.embed -n 200000
multi2convai-quality-it-logreg-ft huggingface.co is an AI model on huggingface.co that provides multi2convai-quality-it-logreg-ft's model effect (), which can be used instantly with this inovex multi2convai-quality-it-logreg-ft model. huggingface.co supports a free trial of the multi2convai-quality-it-logreg-ft model, and also provides paid use of the multi2convai-quality-it-logreg-ft. Support call multi2convai-quality-it-logreg-ft model through api, including Node.js, Python, http.
multi2convai-quality-it-logreg-ft huggingface.co is an online trial and call api platform, which integrates multi2convai-quality-it-logreg-ft's modeling effects, including api services, and provides a free online trial of multi2convai-quality-it-logreg-ft, you can try multi2convai-quality-it-logreg-ft online for free by clicking the link below.
inovex multi2convai-quality-it-logreg-ft online free url in huggingface.co:
multi2convai-quality-it-logreg-ft is an open source model from GitHub that offers a free installation service, and any user can find multi2convai-quality-it-logreg-ft on GitHub to install. At the same time, huggingface.co provides the effect of multi2convai-quality-it-logreg-ft install, users can directly use multi2convai-quality-it-logreg-ft installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
multi2convai-quality-it-logreg-ft install url in huggingface.co: