A simple Framework for
desiging WebApp
●
Streamlit is a free and open-source framework to rapidly build
and share beautiful machine learning and data science web
apps.
●
It is a Python-based library specifically designed for machine
learning engineers.
●
Data scientists or machine learning engineers are not web
developers and they're not interested in spending weeks learning
to use these frameworks to build web apps
●
Streamlit allows you to create a stunning-looking application
with only a few lines of code.
Web Application:
– No front-end (html, js, css) experience or knowledge is required.
– No need to create web-app but can create beautiful machine
learning or datascience app with in few hours
– Compatible with majority of Python libraries like Pandas,
Numpy, matplotlib, seaborn, ploty, etc.,
– Data caching simplifies and speeds up computation pipelines
Install Streamlit on Linux
Invoke the terminal Ctrl+Alt+T
$ sudo apt-get install python3-pip
$ pip3 install pipenv
$ cd project_folder_name
$ pipenv shell
$ pip install streamlit
$ streamlit hello
●
How to run your Streamlit code
– streamlit run file_name.py
●
Display texts with Streamlit
– import streamlit as st
– [Link]("Hello ,let's learn how to build a streamlit app together")
– [Link] ("this is the app title")
– [Link]("this is the markdown")
– [Link]("this is the header")
– [Link]("this is the subheader")
– [Link]("this is the caption")
– [Link]("x=2021")
– [Link](r''' a+a r^1+a r^2+a r^3 ''')
●
Display an image, video or audio file with Streamlit
– [Link]("[Link]")
– [Link]("Audio.mp3")
– [Link]("video.mp4")
●
Input widgets
– [Link]('yes')
– [Link]('Click')
– [Link]('Pick your gender',['Male','Female'])
– [Link]('Pick your gender',['Male','Female'])
– [Link]('choose a planet',['Jupiter', 'Mars', 'neptune'])
– st.select_slider('Pick a mark', ['Bad', 'Good', 'Excellent'])
– [Link]('Pick a number', 0,50)
●
st.number_input('Pick a number', 0,10)
●
st.text_input('Email address')
●
st.date_input('Travelling date')
●
st.time_input('School time')
●
st.text_area('Description')
●
st.file_uploader('Upload a photo')
●
st.color_picker('Choose your favorite color')
●
Display progress and status with Streamlit
– [Link]()
– [Link](10)
– with [Link]('Wait for it...'): [Link](10)
– [Link]("You did it !")
– [Link]("Error")
– [Link]("Warning")
– [Link]("It's easy to build a streamlit app")
– [Link](RuntimeError("RuntimeError exception"))