本文主要介绍 jupyter kernelgateway 在工作中的运用
基本介绍
Jupyter Kernel Gateway 是一个 Web 服务器,提供对 Jupyter 内核的无头访问。应用程序通过 REST 调用和 Websockets 远程与内核通信。
安装
pip install jupyter_kernel_gateway
运行
jupyter kernelgateway
定义一个./my_example.ipynb
,使用 jupyter kernelgateway 对外暴露服务
# GET /hello/world
import json
import requests
import numpy as np
req = json.loads(REQUEST