Compare commits
2 Commits
efd9a08212
...
4a5397f153
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4a5397f153 | ||
![]() |
65bdf3256e |
@@ -41,9 +41,12 @@ The subcommands available at this time are `gather` and `evaluate`.
|
||||
|
||||
## Functions
|
||||
|
||||
* ~recommend~ (in-progress)
|
||||
* recommend
|
||||
|
||||
Infer a UCS category for a text description.
|
||||
Infer a UCS category for a text description. Text metadata is extracted from
|
||||
audio files and the language model can recommend a corresponding list of
|
||||
appropriate categories, ranked by their alignment with the category
|
||||
definition.
|
||||
|
||||
* gather
|
||||
|
||||
|
@@ -2,8 +2,6 @@ import os
|
||||
import sys
|
||||
import csv
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from sentence_transformers import SentenceTransformer
|
||||
import tqdm
|
||||
import click
|
||||
@@ -51,6 +49,11 @@ def recommend(text, paths, model):
|
||||
"""
|
||||
Infer a UCS category for a text description
|
||||
|
||||
"Description" text metadata is extracted from audio files given as PATHS,
|
||||
or text can be provided directly using the "--text" option. The selected
|
||||
model is then used to attempt to classify the given text according to
|
||||
the synonyms and explanations definied for each UCS subcategory. A list
|
||||
of ranked subcategories is printed to the terminal for each PATH.
|
||||
"""
|
||||
m = SentenceTransformer(model)
|
||||
ctx = InferenceContext(m, model)
|
||||
|
Reference in New Issue
Block a user