Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
with st.echo():
for percent in [0, 25, 50, 75, 100]:
st.write("%s%% progress:" % percent)
st.progress(percent)
st.header("Help")
with st.echo():
st.help(dir)
st.header("Out-of-Order Writing")
st.write("Placeholders allow you to draw items out-of-order. For example:")
with st.echo():
st.text("A")
placeholder = st.empty()
st.text("C")
placeholder.text("B")
st.header("Exceptions")
st.write("You can print out exceptions using `st.exception()`:")
with st.echo():
try:
raise RuntimeError("An exception")
except Exception as e:
st.exception(e)
st.header("Playing audio")
audio_url = (
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import streamlit as st
st.text("This text is awesome!")
if st.checkbox("Show Image/Hide Image"):
my_image = load_image("iris_setosa.jpg")
enh = ImageEnhance.Contrast(my_image)
num = st.slider("Set Your Contrast Number", 1.0, 3.0)
img_width = st.slider("Set Image Width", 300, 500)
st.image(enh.enhance(num), width=img_width)
# About
if st.button("About App"):
st.subheader("Iris Dataset EDA App")
st.text("Built with Streamlit")
st.text("Thanks to the Streamlit Team Amazing Work")
if st.checkbox("By"):
st.text("Jesse E.Agbe(JCharis)")
st.text("Jesus Saves@JCharisTech")
best_model_aic = np.round(model.aic,0)
best_model_bic = np.round(model.bic,0)
best_model_hqic = np.round(model.hqic,0)
best_model_order = (p_, d, q_, P_, D, Q_, s)
current_best_model = model
resid = np.round(np.expm1(current_best_model.resid).mean(), 3)
models.append(model)
#st.markdown("------------------")
#st.markdown("**Best model so far**: SARIMA {}".format(best_model_order))
#st.markdown("**AIC**: {} **BIC**: {} **HQIC**: {} **Resid**: {}".format(best_model_aic, best_model_bic, best_model_hqic, resid))
except:
pass
st.success('Grid Search done!')
st.markdown('')
st.markdown('### Best model results')
st.text(current_best_model.summary())
#return current_best_model, models, best_model_order
return best_model_order
my_image = load_image('iris_setosa.jpg')
enh = ImageEnhance.Contrast(my_image)
num = st.slider("Set Your Contrast Number",1.0,3.0)
img_width = st.slider("Set Image Width",300,500)
st.image(enh.enhance(num),width=img_width)
# About
if st.button("About App"):
st.subheader("Iris Dataset EDA App")
st.text("Built with Streamlit")
st.text("Thanks to the Streamlit Team Amazing Work")
if st.checkbox("By"):
st.text("Jesse E.Agbe(JCharis)")
st.text("Jesus Saves@JCharisTech")
else:
st.write(data.head(2))
# Show Entire Dataframe
if st.checkbox("Show All DataFrame"):
st.dataframe(data)
# Show All Column Names
if st.checkbox("Show All Column Name"):
st.text("Columns:")
st.write(data.columns)
# Show Dimensions and Shape of Dataset
data_dim = st.radio('What Dimension Do You Want to Show',('Rows','Columns'))
if data_dim == 'Rows':
st.text("Showing Length of Rows")
st.write(len(data))
if data_dim == 'Columns':
st.text("Showing Length of Columns")
st.write(data.shape[1])
# Show Summary of Dataset
if st.checkbox("Show Summary of Dataset"):
st.write(data.describe())
# Selection of Columns
species_option = st.selectbox('Select Columns',('sepal_length','sepal_width','petal_length','petal_width','species'))
if species_option == 'sepal_length':
st.write(data['sepal_length'])
elif species_option == 'sepal_width':
st.write(data['sepal_width'])
elif species_option == 'petal_length':
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import streamlit as st
from time import sleep
with st.spinner():
for i in range(5, 0, -1):
st.text(i)
sleep(1)
st.text('done')
# return im
# Select Image Type using Radio Button
species_type = st.radio(
"What is the Iris Species do you want to see?",
("Setosa", "Versicolor", "Virginica"),
)
if species_type == "Setosa":
st.text("Showing Setosa Species")
st.image(load_image("imgs/iris_setosa.jpg"), width=400)
elif species_type == "Versicolor":
st.text("Showing Versicolor Species")
st.image(load_image("imgs/iris_versicolor.jpg"), width=400)
elif species_type == "Virginica":
st.text("Showing Virginica Species")
st.image(load_image("imgs/iris_virginica.jpg"), width=400)
# Show Image or Hide Image with Checkbox
if st.checkbox("Show Image/Hide Image"):
my_image = load_image("iris_setosa.jpg")
enh = ImageEnhance.Contrast(my_image)
num = st.slider("Set Your Contrast Number", 1.0, 3.0)
img_width = st.slider("Set Image Width", 300, 500)
st.image(enh.enhance(num), width=img_width)
# About
if st.button("About App"):
st.subheader("Iris Dataset EDA App")
st.text("Built with Streamlit")
st.text("Thanks to the Streamlit Team Amazing Work")
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import streamlit as st
st.text("The space between this...")
st.text("..and this should be the same as between this...")
st.empty()
st.text("...and this")
# Show Image or Hide Image with Checkbox
if st.checkbox("Show Image/Hide Image"):
my_image = load_image('iris_setosa.jpg')
enh = ImageEnhance.Contrast(my_image)
num = st.slider("Set Your Contrast Number",1.0,3.0)
img_width = st.slider("Set Image Width",300,500)
st.image(enh.enhance(num),width=img_width)
# About
if st.button("About App"):
st.subheader("Iris Dataset EDA App")
st.text("Built with Streamlit")
st.text("Thanks to the Streamlit Team Amazing Work")
if st.checkbox("By"):
st.text("Jesse E.Agbe(JCharis)")
st.text("Jesus Saves@JCharisTech")