This commit is contained in:
Waylon Walker 2023-05-19 08:35:16 -05:00
commit 4be274d9e2
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
39 changed files with 2548 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import typer
import uvicorn
from learn_sql_model.cli.common import verbose_callback
api_app = typer.Typer()
@api_app.callback()
def api(
verbose: bool = typer.Option(
False,
callback=verbose_callback,
help="show the log messages",
),
):
"model cli"
@api_app.command()
def run(
verbose: bool = typer.Option(
False,
callback=verbose_callback,
help="show the log messages",
),
):
uvicorn.run("learn_sql_model.api.app:app", port=5000, log_level="info")