1 Missed Call, Panic, and a Great Weekend!

It was a Thursday evening of the last month. After a daylong interaction with the team, I was tired and mindfully enjoying a hot cup of coffee. I left my cellphone on charging and went to the kitchen to get some snacks when I got a call from the office. Unfortunately, by the time I got to it, it got disconnected.

I decided to give a callback.

“We have an upcoming customer visit and need to showcase something innovative in data science and AI. A brief background of the customer: he is a seasoned data scientist, data enthusiast and likes to watch innovative showcases instead of regular presentations, engineering lectures, etc. Owing to his busy schedule, he plans to spare 10 minutes for us.”

The following morning, my mind started spiraling in panic. What do we present? What do we build? Angular, React, Java, Python, ML, NLP, Jupyter, etc., were all brewing up in my mind. It was all about me vs. the time at hand!

Simplicity is the ultimate sophistication.

And, Voila! We created a couple of ML web apps in just 2 hours. It started with a “Hello world” message and was a nifty app to share with friends.

 

Come, let us have a quick tour.

We begin with the following activities:

  • Open Notepad++
  • Fire up your terminal and issue the command below. Feel free, as pretty soon you will be taking off.

Note: Ensure you have Python 3.6/3.7+ installed and both Python and pip are on your %PATH%, or else the pip command may not work.

 

Follow the tradition: Kickoff with “Hello World”:

Open notepad++ and append the following lines and save it with anything.py. After opening the terminal, issue the command as given below:

Well done! Let us spice it up with some widgets. We begin with an easy one – a slider with some value.

That is impressive! One need not be a full-stack web app software engineer to render this.

 

The App :

We have picked a trending technology to work on – Computer Vision. Let us keep things simple and create a personal profile app.

 

Before we forget, let me conclude our original storyline: the client demo thread. We ended up having a fantastic demo with the client. He was impressed with our approach and made a point to get started on Streamlit once he got back to his office. We also got an opportunity to interact with their data team for a free-flowing session on ML, data apps, and their latest libraries. The demo led to a discussion, followed by a quick thought-sharing session, and finally, recognition and applause for our innovative solutions.

The weekend turned out quite fulfilling post that!

Learning Bytes:

  • You got introduced to a powerful Swiss-knife, or the iPhone of Data Apps, where you only focus on the complex world of a web application minus the engineering overhead.
  • Another key learning is the one-liner, where the user doesn’t need to write any front-end code. All they need is an editor and a browser (Notepad++ and Chrome/Edge/Safari).
  • What you would build in weeks can now take merely days or hours to finish.
  • You get a jump start on the data science, ML use case and expedite the results.
  • As a code enthusiast, you may have coded many python programs, but you need to turn them into shareable web apps in minutes instead of getting them stuffed in Jupyter notebooks.
  • Streamlit was built specifically to accelerate the data/ML apps journey and make it evidently easy for beginners as well experts.
  • Data science and ML enthusiasts love to explore ideas by practical implementation, collaboration within teams, etc., and data experts prefer shareable data apps. This approach offers a discreet simplification in this space.
  • The Python stack is open source and has rich community support. It works smoothly with TensorFlow, Keras, PyTorch, Pandas, Numpy, Matplotlib, Seaborn, Altair, Plotly, Bokeh, Vega-Lite, and all python libraries.

Sharing the App:

After building the app, how do you share it?

  • The free Community tier (formerly Streamlit sharing) is the perfect solution if your app is hosted in a public GitHub repo and you want anyone in the world to access it.
  • The Team and Enterprise tiers offer access controls, securely deploy apps from private repositories, customize resources, and much more.
  • No additional effort is needed other than a few configurations, access to GitHub, etc. Most of the work is completed when the program runs. Sharing and deploying posts that are easy tasks, and you can integrate with your favourite CI/CD pipeline as well.

Check it out here Share on Cloud and Deploy in Heroku.

What it does not do:

  • There are other popular frameworks like Django, Flask, etc., in this arena, but Streamlit does not intend to compete with them.
  • For building an enterprise app, you need to rely on these frameworks, but when it comes to simplicity and quick ML apps, Streamlit has a clear edge as it gives a huge productivity boost. You can combine Flask calls as well.

 

For more information, visit the Streamlit documentation with brilliant examples. I am sure it will catch your attention and get you to try it out immediately.

Let this festive season bring happiness and new horizons in innovation. Happy coding!

Author Details

Sweta Utkal Kumari

A dedicated Technology Analyst with 3.5 years of experience adept at collaborating my self with new trend and technologies.

Leave a Comment

Your email address will not be published. Required fields are marked *