26 lines
623 B
Python
26 lines
623 B
Python
import argparse
|
|
|
|
|
|
def main() -> None:
|
|
from .app import app as interactive_shell_app
|
|
from .jupyter import app as jupyter_app
|
|
|
|
parser = argparse.ArgumentParser(description="Run the Jupyter shell web app.")
|
|
|
|
parser.add_argument(
|
|
"--jupyter",
|
|
action="store_true",
|
|
help="Run the Jupyter shell web app.",
|
|
)
|
|
args = parser.parse_args()
|
|
import uvicorn
|
|
|
|
if args.jupyter:
|
|
uvicorn.run(jupyter_app, host="::", port=8000, log_level="info")
|
|
else:
|
|
uvicorn.run(interactive_shell_app, host="::", port=8000, log_level="info")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|