Skip to content

Commit

Permalink
Update streamlit_app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Siva84 authored Jul 2, 2021
1 parent 4a476d8 commit 50062e1
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import pandas as pd
import streamlit as st
import plotly.express as px

@st.cache
def get_data():
url = "http://data.insideairbnb.com/united-states/ny/new-york-city/2019-09-12/visualisations/listings.csv"
return pd.read_csv(url)
df = get_data()
# Sidebar Column
st.sidebar.title('Sidebar Widgets')
#radio button
rating = st.sidebar.radio('Are You Happy with the Example',('Yes','No','Not Sure'))
if rating == 'Yes':
st.sidebar.success('Thank You for Selecting Yes')
elif rating =='No':
st.sidebar.info('Thank You for Selecting No')
elif rating =='Not Sure':
st.sidebar.info('Thank You for Selecting Not sure')
#selectbox
rating = st.sidebar.selectbox("How much would you rate this App? ",
['5 Stars', '4 Stars', '3 Stars','2 Stars','1 Star'])
st.sidebar.success(rating)
st.sidebar.write('Find Square of a Number')
#slider
get_number = st.sidebar.slider("Select a Number", 1, 10)
st.sidebar.write('Square of Number',get_number, 'is', get_number*get_number)

0 comments on commit 50062e1

Please sign in to comment.