"Hello World " Using Streamlit

Anand ShindeAnand Shinde
1 min read

I am using UV to run Python programs. If you know, UV manages project dependencies and environments, with support for lockfiles, workspaces, and more — similar to Rye or Poetry.

import Streamlit

import streamlit as st

We don’t need to write any additional code for the design layout — Streamlit provides built-in UI functionality. Here are some components we’ll discuss:

import streamlit as st

st.title("Hello Chai App")
st.subheader("Brewed with streamlit")
st.text("Welcome to your first interative app")
st.write("choose your fav. variety of chai")

chai = st.selectbox("Your fav chai: ", ["Masala chai","Lemon Tea","Adrak chai","Kesar chai"])

st.write(f"You choose {chai}. Excellent choice")

st.success("You chai has been brewed")

# Assigment : choose your fav programing langauge

prlang = st.selectbox("choose your fav programing langauge: ", ["JavaScript","Python","Java","C","C++"])

st.write(f"You choose {prlang}! it's super")

Preview

st.title – Used to display the title of the app (e.g., "Hello Chai App"). By default, it uses an H1 style.

st.subheader – Used to display a subheading.

st.text – Used to display descriptive text.

st.selectbox – Displays a selection box for choosing an option.

…and many more components, as shown above.

When using Streamlit, a developer’s life becomes a little simpler when building data apps — there’s no need for JavaScript or other frontend code, as Streamlit provides ready-to-use UI components.

It’s also my first Youtube Video

Source Code :- https://github.com/mr-AnandShinde-358/chai-streamlit

1
Subscribe to my newsletter

Read articles from Anand Shinde directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anand Shinde
Anand Shinde

Full-Stack Developer | JavaScript, React, Next.js, MongoDB Specialist | Building Dynamic & High-Performance Web Applications