[PYTHON] Deploy the strongest front-end Streamlit for data scientists on Azure!

This article is Request! Tips for developing on Azure using Python![PR] This is his 5th day of Microsoft Japan Advent Calendar 2020 (I will write it later).


Deploy the strongest front-end Streamlit for data scientists on Azure! It is a story.

What is Streamlit?

Streamlit is an OSS framework that allows you to build sites in Python.

Why Streamlit?

** What is the reason for Streamlit? Isn't React.js or Vue.js, which are popular these days, useless? ** **

** Not at all! ** **

Rather, React.js and Vue.js are much better when compared in terms of expressiveness and flexibility.

So why use Streamlit, which is inferior in terms of expressiveness and flexibility? Because of the aptitude of the person who builds it.

For React.js and Vue.js, the cost of work is significantly higher, as data scientists need to incorporate analytical data into their products:

On the other hand, having an engineer take over the task of "incorporating analytical data into a product" is distorted from the perspectives of productivity, cost performance, and responsibility (* 1).

Streamlit was developed to reduce the high work costs for this data scientist.

Since Python is often used for data analysis, Streamlit allows you to build a front end with Python.

In other words, it compromises the expressiveness and flexibility gained when using React.js and Vue.js to some extent, and it can be built if you know Python.

How to use Streamlit

The installation is OK with the following.

$ pip install streamlit

Official tutorial page is easy to understand for detailed usage.

By executing the following command, you can launch the demo app locally and check it in your browser.

$ streamlit hello

Streamlit can also execute remote resources, and you can execute remote resources by executing the following command.

$ streamlit run https://raw.githubusercontent.com/streamlit/demo-self-driving/master/streamlit_app.py

Deploy to Azure VM

Up to this point, it was a way to quickly check the data at hand locally. You can also deploy to an Azure VM by following the steps below.

  1. Set up an Azure VM
  2. Install streamlit in your instance as you would local
  3. streamlit run [your_streamlit_app.py]

With the above, you can deploy to Azure VM and publish itself.

Recommended Posts

Deploy the strongest front-end Streamlit for data scientists on Azure!
Start data science on the cloud
Shift the data for 3 months Shift the data for n months
Deploy the Flask app on Heroku
Recommended competition site for data scientists
Deploy the Flask app on heroku
Publish a web application for viewing data created with Streamlit on heroku
Deploy the Django app on Heroku [Part 2]
Deploy the Django app on Heroku [Part 1]
Deploy functions with Cloud Pak for Data
Completely erase the data on the hard disk
Analysis for Data Scientists: Qiita Self-Article Summary 2020
Data Science Virtual Machines is the best environment for data analysis from now on!