jupyter / nbviewer

nbconvert as a web service: Render Jupyter Notebooks as static web pages
https://nbviewer.jupyter.org
Other
2.19k stars 544 forks source link

Add provider for huggingface.co: Very basic `uri_rewrites` #1033

Closed julien-c closed 1 year ago

julien-c commented 1 year ago

Hi!

I use https://nbviewer.org/ quite a bit and we are also considering implementing a notebook-rendering service on huggingface.co that could potentially be built on top of nbconvert and/or nbviewer.

As a quick useful feature, I added URL rewrite from huggingface "blob" URLs, i.e. those you get when navigating to a ipynb file inside a repository, to the "resolve" URLs which we use to serve actual content.

This works for both:

Let me know if this looks ok!

SylvainCorlay commented 1 year ago

This looks good to me. I approved the CI to run and will merge if it turns out green!

julien-c commented 1 year ago

Thanks for merging! will look for it when it's deployed.

SylvainCorlay commented 1 year ago

Thanks for merging! will look for it when it's deployed.

This is not done upon merging PRs (An explicit action must be taken).

SylvainCorlay commented 1 year ago

@julien-c there you go!

Screenshot 2023-01-11 at 13 33 41