minilm testing

This commit is contained in:
2026-04-08 17:27:11 +05:30
parent ec6fbe40e4
commit d227f37cc2
8 changed files with 24684 additions and 8 deletions

13
inference.py Normal file
View File

@@ -0,0 +1,13 @@
import argparse
from mini_lm import predict
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run token classification inference.")
parser.add_argument("text", nargs="*", help="Input text to label.")
parser.add_argument("--top-k", type=int, default=3)
args = parser.parse_args()
text = " ".join(args.text).strip() or "convert foo.mp4 to mkv"
predict(text, top_k=args.top_k)