Spaces:
Build error
Build error
File size: 837 Bytes
879a21c 15ccbbc 879a21c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | from __future__ import annotations
import argparse
from pathlib import Path
import bootstrap # noqa: F401
from signspeak.llm import generate_subtitle_and_instruction
from signspeak.pipeline import DEFAULT_INTENT, json_text
def main() -> None:
parser = argparse.ArgumentParser(description="Run only the llama.cpp intent-to-text brick.")
parser.add_argument("--intent", help="Path to an intent JSON file. Uses the sample intent if omitted.")
args = parser.parse_args()
intent_json = Path(args.intent).read_text(encoding="utf-8") if args.intent else json_text(DEFAULT_INTENT)
subtitle, instruction, raw = generate_subtitle_and_instruction(intent_json)
print(f"Subtitle: {subtitle}")
print(f"Voice instruction: {instruction}")
print(f"Structured output: {raw}")
if __name__ == "__main__":
main()
|