Welcome back, everyone! π First, a huge thank you to everyone who gave me wonderful reactions and comments on my Twitter & LinkedIn posts as soon as I launched this series.
βNote for new readers: Please read the first article in this series as it covers a simple introduction to Streamlit framework, apps & components.
Second, let's straight dive into the apps for today!
π Awesome Apps Corner
π₯Presenting...
1. LinkedIn Connection Insights π€
Would you like to get a "graph view" of your Linkedin connections? If yes, then please try this app!
- Linkedin is like Facebook, but to connect & network with professional people!
- To upload a ZIP file, you need to generate an archive of your data, follow along ---
- Log into Linkedin > Click on your Profile Image > Click Settings & Privacy > Data privacy > Click on "Get a copy of your data" > Choose "Want something in particular? Select..." > β Tick on "Connections" > Click Request archive
- After waiting for a few minutes, a ZIP file will arrive in your mail!
- This app's creator is Benedict Neo and he has written an article with a detailed explanation of his app!
- Try it out π Open App
- πSource Code
π₯Next up, is...
2. AI Photo Rater π€³ π
- This app rates your photo based on certain metrics like Quality, Hotness, Intelligence, etc...
Tom DΓΆrr created this app and has covered the info in his tweet here!
Please do give it a try πOpen App
- πSource Code
π₯Next comes,
3. Thai-Fruit Image Classifier π
- The app uses "deep learning methods" to classify thai fruits only!
- Try it out πOpen App
- πSource Code
π₯Another one...
4. Non-linear Career Visualizer πΌ
- It's an interesting app to visualize your career without using a straight line!
- Michael is the creator of this app & has a detailed article attached along with it.
- Please do give it a try πOpen App
- πSource Code
π₯Last one, is...
5. Perfume Recommendation π²
- Built by Billy Bonaros, his app uses AI and
NLP tech for converting text to perfume based on the description provided by you!
- Describe a scenery, some perfume notes, keywords, or whatever you want & it will recommend a perfume.
That's the end of viewing some awesome apps, I'll be sharing more apps in the next article! π
Now, it's time to learn about adding new functionalities to our Streamlit apps!
πStreamlit Components : streamlit_player
With the streamlit_player
component, anyone can embed video and music players from various websites. Creator of this component is okldβ¨
Why use this component anyway? π€ Well, streamlit already has elements to load video and audio files.
st.video
to load video files, but it includes support for YouTube URLs and local MP4 files only.st.audio
to load only local raw (.wav
) files.- These elements set the limit for users not to load files from various websites π. That's where this component is very helpful!
π©βπ» Let's Code together
Let's install it first ---
pip install streamlit-player
I assume you've already installed the latest version ofstreamlit
before. We need to create a st_player.py
file. Now, follow the format below.
Steps
- Adding required libraries ---
import streamlit as st from streamlit_player import st_player
- We will be using the
st.tabs
layout feature to insert different video & audio links in separate containers. Here, we'll copy & paste URL links from Dailymotion, SoundCloud & Vimeo websites.
st.title('π¬ Streamlit Player Test')
tab1, tab2, tab3 = st.tabs(["Dailymotion", "SoundCloud", "Vimeo"])
3.Make use of with notation to embed links within each tab.
with tab1:
st.write('Dailymotion Video')
st_player("https://dai.ly/x7v68qm")
with tab2:
st.write('SoundCloud Audio)
st_player("https://soundcloud.com/ashleygerardmusic/falling-harry-styles")
with tab3:
st.write('Vimeo Video')
st_player("https://player.vimeo.com/video/521067593")
4.Save all the code & type the below command in a conda virtual environment
streamlit run st_player.py
Make sure that you're running the file from the correct saved location. If everything goes well, then Chrome will open up a new browser running your Streamlit App! π
- πOpen Demo App
- πActual Source Code
Conclusion
That's it for today! I hope you've enjoyed and learned something new here.
πββοΈ Feel free to drop your questions & your thoughts in the comments below!
Connect with me on Twitter, Github, and LinkedIn.
Happy Streamlit-ingπ