From cecacb0f3468918e205f0bd35eac3e0b4fa5b9bd Mon Sep 17 00:00:00 2001 From: DamonDeng Date: Wed, 28 Dec 2016 09:21:46 +0800 Subject: [PATCH] moving the html and javascript code in python/tutorials/mnist_demo.py to /python/tutorials_demo.html (#18) --- python/tutorials/mnist.ipynb | 4 +- python/tutorials/mnist_demo.html | 91 ++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 python/tutorials/mnist_demo.html diff --git a/python/tutorials/mnist.ipynb b/python/tutorials/mnist.ipynb index 81e556e87..991d3ea63 100644 --- a/python/tutorials/mnist.ipynb +++ b/python/tutorials/mnist.ipynb @@ -386,7 +386,7 @@ "from IPython.display import HTML\n", "import cv2\n", "import numpy as np\n", - "from mnist_demo import html, script\n", + "\n", "def classify(img):\n", " img = img[len('data:image/png;base64,'):].decode('base64')\n", " img = cv2.imdecode(np.fromstring(img, np.uint8), -1)\n", @@ -398,7 +398,7 @@ "To see the model in action, run the demo notebook at\n", "https://github.com/dmlc/mxnet-notebooks/blob/master/python/tutorials/mnist.ipynb.\n", "'''\n", - "HTML(html + script)" + "HTML(filename=\"mnist_demo.html\")" ] }, { diff --git a/python/tutorials/mnist_demo.html b/python/tutorials/mnist_demo.html new file mode 100644 index 000000000..c130bb277 --- /dev/null +++ b/python/tutorials/mnist_demo.html @@ -0,0 +1,91 @@ + + + +
+ + + Sorry, your browser doesn't support canvas technology. + + +

+ + + + + Result: + + +

+ +
+ + + +