Voilà for Jupyter notebooks (bear_classifier; lesson 2)

Trying to follow the steps as provided in the video/notebook (02_production).

Got everything up and running on my/local machine (Mac), but not able to make it work on voila (i.e. to see it as a Voilà web application by replacing the word “notebooks” in browser’s URL with: “voila/render”. )

Current URL http://localhost:8888/notebooks/Downloads/fastbook-master/bear_classifier.ipynb
naively replaced with
http://localhost:8888/voila/render/Downloads/fastbook-master/bear_classifier.ipynb

When attempting to run getting this error:

What is the way to make it work locally?

Any help appreciated!

1 Like

Got it working by following basic instructions on Voila: https://blog.jupyter.org/and-voilà-f6a2c08a4a93

" Upon installation, several components are installed, one of which is the voila command-line utility. You can try it by typing voila notebook.ipynb . It results in the browser opening to a new tornado application showing markdown cells, rich outputs, and interactive widgets."

1 Like

i got the same problem while running on paperspace.I changed that piece of URL as Jeremy did but it gave me a 404 error,then i tried to use voila in the terminal and it returned me “[Voila] WARNING | No web browser found: could not locate runnable browser.”

Diegowu02, as mentioned in video, that was implemented in separate notebook, which you could get here: https://github.com/fastai/bear_voila

I have the same problem, I already tried to voila in command line, but it’s not opening under localhost either. Please help!!!

i got it working,just by putting the requirements.txt file in the same folder.

I got it working locally by making 2 changes. First of all you run jupyter notebook/lab with a command-line parameter:

jupyter-lab --VoilaConfiguration.enable_nbextensions=True

Then 2nd you need to enable Voil as a jupter extension. So you don’t use “–sys-prefix” options, you use “–user” instead:

Screenshot_2020-09-14 JupyterLab

3rd, if your jupyter lab is running at “http://localhost:8888/lab” , then Voilà would be accessed at “http://localhost:8888/voila

Then this is how it looks:

Screenshot_2020-09-14 Voila Home

You can click on any notebook to see how it works.

I was running into same issue, not locally but online via https://console.paperspace.com/notebooks, and wasn’t able to resolve using above.

In case it helps anyone else using paperspace, I found an alternate method by clicking the “Voila” button at the top of my notebook and then adding my token to that url, details: https://github.com/fastai/bear_voila/issues/5#issuecomment-706735696

Are you using Gradient? or are you on your PC?

I also got the same. Did you try restarting your kernel after installing?

I am using gradient. And it doens’t work in command line for me. But There is a button on Jupiter as shown in @Diegowu02 's gif and it works perfectly from there on.