Extending Streamlit usage to create data science applications and other type of applications

Writing a post or a book, it is to set a milestone to your thoughts. By the way, that is also one of the main advantage of the agile method with the Sprint concept, setting a time limit. As a consequence, empiricism and action has always my favor on theory. For sure, in digital, remaining theorical is sometimes to stay in a comfort zone with neither validation nor invalidation from the battlefield. That is a way to grow the virus of inaction that lead to impotence! Wow… sounds angry 🙂 No, let’s say, I am more weary, weary of chilly people exhausting you with formal prerequisites that will never be satisfied. I believe that these so-called prerequisites mostly reveal fear for uncertainty! But, once for all, let’s take it for granted: the place of the unforeseen cannot be eliminated. Human actions and thought are always stricken with incompleteness! That being said, it is also wised not to act without thinking, even though your thoughts are confused.

You can find the code on my github account:

You can watch the videos related to this article:

  1. Part 1 Extending Streamlit Usage – Discovering and using Python with SQlite through the console and with sqlitebrowser
  2. Part 2 Extending Streamlit Usage – Create a CRUD countries manager with Streamlit
  3. Part 3 Extending Streamlit Usage – Using Streamlit as a Wireframing Tool

That is exactly my situation, by learning python, I do not know what exactly I am looking for in the first place but discovering Streamlit step by step has become a win-win game where:

  • I deepen my knowledge and practices of Python for real purpose.
  • I explore possibilities of Datascience and ML.
  • And create a whole series of web applications sometimes far beyond the data science perimeter!

Indeed, for my own work, as an autodidact in computer science, I do not respect any constraints except my imagination! Streamlit is announced as being the fastest way to build custom ML tool but it has also the potential to become much more than that.
It has definitely the potential to change the way you can create, build and share tools because it’s so plain simple to use.

Some take-aways from this exploration

From this multipurpose Streamlit exploration, I can withdraw several assets :

  1. Keep Exploring NLP and Streamlit: Still making NLP experience with Spacy. I have made some attempts with NLP usage on theater play written by my sister in a 99 project experiment.
    Source : http://www.the99project.net/2021/04/09/99-ambitieuses-2/
  2. Best way to Leverage, Optimize and Automate any kind of P.O Work into an webapp: This approach fits perfectly with Streamlit. Anything that streamline my tasks both dull or absorbing work by processing it with a creative turn-to-key tools build on top of Streamlit is welcome! With Streamlit, I may have found the “Graal” and the Sky seems to be the limit!
  3. Streamlit as a Wireframing Tool: I am definitly a Wireframing fanatic! As a PO, I always try create a “user experience cinematic” to explain the feature that I want to be developed. To do this, I use numerous software such as Balsamiq, OmniGraffle, Axure… and release sometime movies out of it to show and explain as much as possible what I want. In a way, reading my tickets in Jira is more like going to the movie. In the future, I may straighly leverage on Streamlit to expose what I want in terms of UX. Building directly the app replace a real sketch. This might help me to remove all the unnecessary, annoying or confusing elements that detract developpers. Streamlit will provide me “UX fat-free” app…
  4. Using Streamlit and SQLite for bigger amount of Data: Replacing CSV and using the most used database engine in the world can be practical. This free database is also a great alternative to MySQL to build a webapp on the top of it if you required to store more data than in single CSV file for instance.

Some command to install some librairies via pip or anaconda.

# go to any dir if you are using anaconda
cd /path/
 
# install spacy for efficiency
python -m spacy download fr_core_news_sm
# spacy.load('fr_core_news_sm');
 
# install spacy for accuracy
python -m spacy download fr_dep_news_trf
# spacy.load('fr_dep_news_trf');
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_sm
python -m spacy download fr_core_news_sm
python -m spacy validate
pip install pysqlite3 
pip install db-sqlite3