2

I'm aware of similar previous questions such as:

What is the easiest way to create a webapp from an interactive Jupyter Notebook?

Exporting Interactive Jupyter Notebook to html

However they are old and outdated (for example dashboards_bundlers is no longer supported...)

Is there any recent progress allowing to turn an interactive notebook into a web/desktop app easily?

oshi2016
  • 875
  • 2
  • 10
  • 20

1 Answers1

0

There is a framework Mercury that allows to easily convert the notebook to web application. You need to add the YAML header as RAW cell to your notebook.

The example notebook:

---
title: My app
description: My first notebook shared on Mercury
params:
    greetings:
        input: select
        label: Select greetings
        value: Cześć
        choices: [Cześć, Hello, Hi, Salut, Ciao]
    year:
        input: slider
        label: Select year
        value: 2022
        min: 2021
        max: 2030
---
greetings = "Cześć"
year = 2022
print(f"{greetings} {year}")

The above notebook will generate a web app like in the screenshot below: Mercury example app

There is an option to hide the code and only show the output to non-programming users.

The Mercury is built on top of Django, can be easily deployed to any server/cloud.

pplonski
  • 5,023
  • 1
  • 30
  • 34