Executing .ipynb on github?

I’m not sure what you really mean by “I am able to deploy jupyter Notebook code using index.html into my GitHub”? When I look at the source code for the pages https://github.com/nasrin1748/jupyter_trying, it is only referencing making static pages via GitHub’s Pages offering. Static pages aren’t going to run Python/Jupyter code. Unless you pivot to using JupyterLite/Voici and it doesn’t seem you have.

It looks to me you just made a static page with some of the css features of Jupyter to make look what looks like a cell above some other content that lets you upload and download.

That being said, to make it only show what I understand you are calling the ‘result’, remove the code making the cell at the top.


However, as we’ve dicussed before, you seem to actually want Voici?
It lets you make pages like Voila but on static served sites. The documents with the content for Voici pages are Jupyter .ipynb files.

Go here to look into it some.
Then go to the guide referenced under Make your own Github pages deployment to try a demo by clicking on ‘try lite now’ badge. Or clicking on the link under ‘Try it in your browser’. Since you mention .html here, I’ll note that link ends at a .html site that you can go to directly, too, by putting https://voila-dashboards.github.io/voici-demo/voici/render/demo.html in your browser’s URL bar. (Or click the following link https://voila-dashboards.github.io/voici-demo/voici/render/demo.html.)
That guide will tell you how to set things up on your own GitHub Pages.

I have a demo I made doing that on my own GitHub Pages here. You launch my clicking the ‘try line now’ badge there. The first one listed there, demo.ipynb, fully works because I just tried it. Plus, ‘old_simple_demo.ipynb’ in that listing that goes to https://fomightez.github.io/voici-demotestMay24/voici/render/old_simple_demo.html works, too. The other ones listed there are tests though and so best avoided at this time. (I see test_providing_inside_nb.ipynb runs fine, too.)

2 Likes