github-actions[bot]
Sync from GitHub 33c12db74322f3d28409b5dc0a8c441914c9178b
e0552b0
raw
history blame contribute delete
583 Bytes
import typer
from koja_diffuser.tokenizer.typer import tokenizer_app
from koja_diffuser.train.typer import train_app
from koja_diffuser.runtime.inference import Inference
app = typer.Typer()
app.add_typer(tokenizer_app, name="tokenizer")
app.add_typer(train_app, name="train")
inference = typer.Typer()
@inference.command()
def k2j(name: str):
inf = Inference()
res = inf.ko_to_ja([name], [1])
print(res)
@inference.command()
def j2k(name: str):
inf = Inference()
res = inf.ja_to_ko([name], [1])
print(res)
app.add_typer(inference, name="inference")