I have a jupyter notebook that accepts user-input via the input() python function. It then takes the input and uses it to a run a model and then outputs/plots the result. Is there a way to create a web-app that does this? Of course, the web-app must also accept user-input and have access to my model.
-
Does this answer your question? [What is the easiest way to create a webapp from an interactive Jupyter Notebook?](https://stackoverflow.com/questions/38867031/what-is-the-easiest-way-to-create-a-webapp-from-an-interactive-jupyter-notebook) – Abhishek Singhal Jul 08 '20 at 13:19
3 Answers
Someone has already made a plugin for that. Try appmode
for Jupyter Notebook. Here's the repository. Hope that works out!

- 66
- 4
There is a framework called Mercury that can convert Jupyter Notebook into web app by adding YAML header. Please add Raw cell at the the beginning of the notebook:
title: My app title
description: What is your app doing?
params:
my_variable:
input: text
label: Please provide input
In the next cell please add variable with some default value
my_variable = "some text"
Then you can have your Notebook code. The Mercury framework will convert Notebook into web app.
If you would like to hide the code. Just add show-code: False
after description
in the YAML header and your users will only see outputs.
The Notebook can be easily deployed to the cloud.

- 5,023
- 1
- 30
- 34
It doesn't work like that. If you want to make a web app, you'll make GUI with html/css for taking input and displaying output. Your python code will work as the backend
of the application. You can use a python framework like flask
to make things easier.

- 1,159
- 1
- 8
- 20