5 ms·
Jupyter Notebooks to Web App
- 0-_-0 7y agoThanks for letting me know about streamlit: https://www.streamlit.io/ https://www.streamlit.io/
- blondin 7y agoseconded. i have seen and heard the name but thought it was yet another python web framework -- like, you know, we be getting a lot of them lately. i will definitely check it out because i always wondered that jupyter is fun and game, but how do you productionize your work after?
- viraptor 7y agoThere was another cool streamlit introduction posted on hn some time ago: https://towardsdatascience.com/coding-ml-tools-like-you-code-ml-models-ddba3357eace https://towardsdatascience.com/coding-ml-tools-like-you-code...
- christianjung 7y agoStreamlit doesn't natively work with Jupyter however.
- jf___ 7y agoA mature implementation exists, called voilà, see https://github.com/voila-dashboards/voila https://github.com/voila-dashboards/voila, which is developed by members of the Quantstack.
- nocitrek 7y ago!awk '!/ipython/' YOURNOTEBOOKNAME.py > temp.py && mv temp.py app.py && rm YOURNOTEBOOKNAME.py You mean: !awk '!/ipython/' YOURNOTEBOOKNAME.py > app.py && rm YOURNOTEBOOKNAME.py
- ackbar03 7y agoMy personal opinion is just that I don't like jupyter notebooks... If your thinking of deploying the code as an app you really shouldn't be using notebooks in the first place. In fact for anything even modestly complex you shouldn't be using notebooks... Your never going to get the habit of writing good code... But different things work for different people I guess
- fellowship1764 7y agoHere is a link to their forum: https://discuss.streamlit.io/ https://discuss.streamlit.io/
- vincent-toups 7y agoJupyter notebooks are a bitter reminder that worse is better. I'm a data scientist and I hate them.
- mistermann 7y agoCan you elaborate why, I've heard mostly love for them.
- vincent-toups 7y agoMy main gripe with them is that the dependencies between the cells are implicit and the results of each cell are resident in memory instead of a more durable form (like artifacts on disk). The best way to understand why I hate notebooks is to contrast them with my workflow: when I do data science, each step in the process is represented by a Makefile target which lists its products and its dependencies explicitly. All products are represented as concrete objects on disk (json, csv, figures, or serialized representations in some form). If I need to do reporting, its typical for various targets to generate fragments of latex and for the report (a pdf) to explicitly document which fragments of latex and which figures belong in the report. Them a simple `make report.pdf` is enough to generate the final result. If I change something I can explicitly see which pieces need to be rebuilt and how. I also believe that the structure of a notebook, which mixes code and reporting, encourages bad software design practices like copy-pasting - it doesn't naturally encourage refactoring of shared code into libraries or anything like that. Most jupyter notebooks are just a pile of shit, basically. The big problem is that all the cells in a notebook share one, big, mutable, global state. This is wrong. They also don't work well with git, which I view to be the absolute crux of any successful technical project.
- ageofwant 7y agoThis is the big difference between 'data scientist' and 'software engineer'. Your workflow is almost certainly repeatable and verifiable, which is just better science. The crux is is that Jupyter was not made for people with your skills, or more accurately, pattern. What you do is not inherently hard or complicated. Certainly not more than actual data science. It's a cultural thing mostly.
- ishaandey 7y agoGreat work! Would you know if this can be used to deploy interactive ML models?
- iudqnolq 7y agoStreamlit's docs talk about magic, and their contributions guide mentions protobufs for Python and JS. Nowhere can I find info on how this actually works under the hood. Is it possible to extend without writing JavaScript?
- tvst 7y agoHey, Streamlit co-founder here! (I'm otherwise not related to this article, btw. Just saw it on HN. Super cool!) If I understand correctly you're trying to extend Streamlit in some way? If so, we have some features coming out in a few months you will probably like. More news on what exactly in a few weeks. Stay tuned :) If you have any other questions, check out our forums at https://discuss.streamlit.io https://discuss.streamlit.io Cheers
- christianjung 7y agohey tvst, op here. Love your work!
- iudqnolq 7y agoThat for the info! More than I was hoping to see a page with a 30sec architecture overview of how your magic works so I'd know what's even possible.