Compare commits

...

2 Commits

Author SHA1 Message Date
Jamie Hardt
4a5397f153 Refinement 2025-08-27 15:47:38 -07:00
Jamie Hardt
65bdf3256e Added to readme 2025-08-27 15:43:19 -07:00
2 changed files with 10 additions and 4 deletions

View File

@@ -41,9 +41,12 @@ The subcommands available at this time are `gather` and `evaluate`.
## Functions ## 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 * gather

View File

@@ -2,8 +2,6 @@ import os
import sys import sys
import csv import csv
from typing import Optional
from sentence_transformers import SentenceTransformer from sentence_transformers import SentenceTransformer
import tqdm import tqdm
import click import click
@@ -51,6 +49,11 @@ def recommend(text, paths, model):
""" """
Infer a UCS category for a text description 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) m = SentenceTransformer(model)
ctx = InferenceContext(m, model) ctx = InferenceContext(m, model)