# Input Cell Voilà

**URL:** <https://discourse.jupyter.org/t/input-cell-voila/10965>\
**Category:** General\
**Created:** [September 25, 2021, 8:32pm UTC](https://discourse.jupyter.org/t/input-cell-voila/10965 "2021-09-25T20:32:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [September 26, 2021, 6:21pm UTC](https://discourse.jupyter.org/t/input-cell-voila/10965/4 "2021-09-26T18:21:19Z")

</div>

First when developing for appmode, get appmode working in your launches, then refine your notebook, and then you should be ready to launch directly. In your case, the link would be:

```nohighlight
https://mybinder.org/v2/gh/Stefano2209/My_Second_Binder/main?urlpath=%2Fapps%2FEs_pag_32.ipynb

```

You can look at the URL from the launch badge at [GitHub - oschuett/appmode: A Jupyter extensions that turns notebooks into web applications.](https://github.com/oschuett/appmode) by hovering over it and see the pattern you need to follow in adapting your launch URL.

**However,** in [that current version of your repository](https://github.com/Stefano2209/My_Second_Binder/tree/0166d1a921d7eb6b4ffcf36714024760c9c27dea), you aren’t installing appmode, and so even if you get the URL right, it isn’t going to work. The [directions there touch upon setting up the configuration file](https://github.com/oschuett/appmode#installation) for MyBinder. However, it is quite concise and so if you aren’t familiar with [MyBinder configuration files](https://mybinder.readthedocs.io/en/latest/using/config_files.html), it may not help.

I forked your repo and found I could get it working with appmode by deleting your `requirements.txt` & replacing it with `environment.yml` with the following contents based on the directions at the appmode repo and what you had in your `requirments.txt`:

```nohighlight
name: appmode-binderized
channels:
  - conda-forge
dependencies:
  - appmode
  - pip
  - pip:
    - numpy
    - matplotlib
    - ipywidgets

```

I didn’t pin anything but you can add that back in and test. Make sure you look up the way to version for conda in a `.yml` file.

You can test my fork [here](https://mybinder.org/v2/gh/fomightez/My_Second_Binder/main?urlpath=%2Fapps%2FEs_pag_32.ipynb) if you want. (The repo for my fork is [here](https://github.com/fomightez/My_Second_Binder).)

Bonus Jupyter tip:  
Add a semi-colon to the end of your plotting cell so the last thing the cell sees is the `semi-colon` & not the plot object, like this:

```python
plt.plot(t,v),plt.xlabel('Tempo (secondi)'), plt.ylabel('Velocità (metri/secondo)'),plt.grid();

```

(This is trick is covered [here](https://stackoverflow.com/a/25790871/8508004).)  
That way you won’t see something like this above your plot:

```python
([<matplotlib.lines.Line2D at 0x7fe595155790>],
 Text(0.5, 0, 'Tempo (secondi)'),
 Text(0, 0.5, 'Velocità (metri/secondo)'),
 None)

```

Jupyter takes the last object and tries to show it. In this case it shows it as a Python object, probably because of the `repr` for the class. It’s a Jupyter convenience normally by allowing you to just put a variable at the end of cell and get it represented, instead of needing a `print()` or `display()`.

* * *

I think in the second half of your post you are asking about using your code offline so it is private? There are several ways. The most complex would be to set up a private Binderhub on your network. That would give you the same possibilities as with MyBinder and so appmode would work. A JupyterHub would allow this as well. You may want to look at [the Littlest JupyterHub](https://tljh.jupyter.org/en/latest/#). With the other ways, such as ContainDS Desktop (see below), I’m not sure how easy they are to set up with appmode.

This has been touched on in the forum at the following places:

- [Sharing Jupyter Notebooks + Voila with non-technical people - #2 by fomightez](https://discourse.jupyter.org/t/sharing-jupyter-notebooks-voila-with-non-technical-people/6858/2)
- [How do you share notebooks? Best practices around sharing to external stakeholders? - #14 by danlester](https://discourse.jupyter.org/t/how-do-you-share-notebooks-best-practices-around-sharing-to-external-stakeholders/3617/14)

Now there is also Desktop based JupyterLab, see [here](https://blog.jupyter.org/jupyterlab-desktop-app-now-available-b8b661b17e9a). If you switch over to using Voila, this may be a viable way, I think? However, I haven’t used it yet and I don’t know if it integrates with Voila quite yet?

There is also a lot of development behind [Jupyterlite](https://jupyterlite.readthedocs.io/en/latest/) which is “a full static Jupyter distribution that runs in the browser, without having to start the Python Jupyter Server on the host machine.” See [here](https://blog.jupyter.org/jupyterlite-jupyter-%EF%B8%8F-webassembly-%EF%B8%8F-python-f6e2e41ab3fa) for a detailed blog post featuring it. It has support for ipywidgets already in it, try an example [here](https://jupyterlite.github.io/demo/retro/notebooks/?path=pyolite%20kernel%20examples%20/interactive-widgets.ipynb); however, `await micropip.install('voila')` or `await micropip.install('appmode')` both fail. So this could be used to serve static pages to your users with some sort of authorization and **for now** you could walk them through using the notebook. Under ‘Next Steps’ [here](https://blog.jupyter.org/jupyterlite-jupyter-%EF%B8%8F-webassembly-%EF%B8%8F-python-f6e2e41ab3fa) it says Voila is in the works, and so eventually you’d have a more app style offering possible.

Are you sure you need to keep it private though? There are ways you can keep things cryptic and send your colleagues information that allows it to make sense. Sometimes the input data needs to be private and there are ways you can supply those separately so they aren’t shared.

And beyond notebooks, there is a way to share the Python that runs in the notebook on flask and django-based sites. You can add logins to those so that only folks with logins can use the app you’ll serve there.

---

_[View the full topic](https://discourse.jupyter.org/t/input-cell-voila/10965)._
