Spaces:
Build error
Build error
| 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() | |