2

I am using Github to create a portfolio. I wrote some code in Google Colab and uploaded it to Github. But I can't see the output. I'd like to see the output appear, so the person who sees my portfolio would understand what I have done.

Is there any way to show the output in github?

Colab: enter image description here

Github:

enter image description here

3
  • 2
    Is your Github site public? You can try the Jupyter ecosystem's supported notebook viewer nbviewer. You go there and put in your GitHub repo or gist link & you'll get a page with it rendered. nbviewer renders things much better than GitHub's default viewer. While GitHub's viewer has much improved of late, nbviewer remains the go-to site for this purpose and to share rendered links. GitHub's renderer is best thought of as being there to provide some basic insight & for those actively using GitHub. nbviewer is more full-featured & meant for sharing with non-GitHub users. Commented Mar 29, 2022 at 15:54
  • 1
    @Wayne that work perfectly and it's easy. Thank you. Commented Mar 30, 2022 at 19:51
  • I'm going to make it a proper answer since others might end up here given the title of your post. Commented Mar 30, 2022 at 20:10

1 Answer 1

2

nbviewer

nbviewer, provided by the Jupyter community, offers many types of rich output rendering and interactivity for previously run notebooks.

nbviewer has several full-featured abilities GitHub doesn't and presents it in a nice way that's not overwhelming for those not as tech savvy as GitHub users. You can point it at any GitHub or gist, or even where the notebook code is online at a URL. The link to the view can be shared with others.

I like to think of the Github notebook viewer as a quick preview.


nbsanity

Or if you are working more on a mobile devices or need more flexibility in rendering, you may be interested in a parallel tech at nbsanity.com. (Source code at https://github.com/hamelsmu/nbsanity .)

"I WAS SO FRUSTRATED with the way @github renders Jupyter Notebooks, esp on mobile (You cannot horizontal scroll code, even with nbviewer). It's different than nbviewer because it uses @quarto_pub as the renderer, which has a more sane way of showing notebooks on different platforms.The upshot is, it will also respect all the quarto directives if that happens to be in your notebook" - Source: Hamel Husain (here and here)

UPDATE:
In regards to better control of output rendering:
https://x.com/HamelHusain/status/1869609229944054187 December 2024

"But why is nbsanity needed? There are already things like nbviewer, however we need to allow for the customization of output, so cell input/output can be hidden, collapsed, etc. We leverage the power of @quarto_pub (our fav SSG for notebooks) https://answer.ai/posts/2024-12-13-nbsanity.html#what-is-nbsanity "

And justification for need given GitHub's rendering issues: https://x.com/HamelHusain/status/1869609196486017085 December 2024

"The most annoying gap in AI infra is poor rendering of notebooks on GitHub. ... This is why we are excited to announce nbsanity ..."

See here for additional newer information on nbsanity.

Sign up to request clarification or add additional context in comments.

2 Comments

That's what I am looking for. Thank you, @Wayne. Anyway, when GitHub will support the render like nbviewer?
@dudung I have no idea. Or if they ever would. Adding more options and abilities adds more to maintain or more for others to exploit. Plus there's other things they need to insure it doesn't break.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.