How to display FileUpload widget, choose files, process them and display results in a jupyter notebook app

My question is related to
I would like to make a jupyter web app so that:

  1. I display a FileUpload widget
  2. Choose and upload multiple files
  3. Process the uploaded files
  4. Display results like plots, data (as on a dashboard)
    So far, I’m able to display the widget but all processing and plotting cells, that depend on the widget’s data are run before the files are chosen and loaded via the widget.
    An way to achieve this?

I don’t know how fancy you are trying to make this or how soon you need it. I tried to make something similar with Voila and kept getting stuck making drag-n-drop multiple file upload work despite there being documented support for it now in the widgets library. I was just probably missing something I needed to activate or enable. The closest example I had come across is the ‘render-stl’ example at the Voila gallery. (That example is very close to what you seem to be trying to do as well.) Sadly, that is only a single file that gets uploaded, and I couldn’t figure out how to expand the allowed types of files. So I just used JupyterLab which supports drag and drop and made a notebook that opened by default and guided user through steps. The repo where you can also launch it from via MyBinder is here.

Looking forward to hearing what others have to say.