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!

2 Likes

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."

4 Likes

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.

2 Likes

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

1 Like

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.

Hi there !,

I am currently trying to turn the jupyter notebook into the Voilà app. Jeremy makes mention of a “bear_classifier” notebook in the book’s repo to show how the application is created. However when I check GitHub there is no such notebook.
fast.ai course github
I am using gradient to run my notebook would anyone kindly provide me with a guide on what code is required to be added in for the app. Jeremy states to add only the code needed to create and show the widgets but what about the model ?

update: I found the repo for the demo if you are looking for it here it is.
Voilà Bear Demo

1 Like

That Voila Bear demo does not work for me. I copied the demo from the GitHub repo to my jupyter notebook, run it, press the upload button, upload an image, and then nothing, no result. I had the same problem in general with the upload button in the previous exemples in the notebook, although when pressing the button it seems to upload my image, it does not pass that image to the next cell.

I am using GCP, and Safari. I saw other users commenting that they had a similar problem with the upload button, but it seems that no-one found a solution, instead entered image manually in the notebook cell.

would appreciate any assistance since I would love to put my application in production!

Thanks

Getting classifier to work on binder using voila, has to be one of the most frustrating parts of the course so far.

It fails then suddenly works. I’ve changed requirements.txt then each box in binder and finally one works.

1 Like