-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.py
57 lines (45 loc) · 1.6 KB
/
Main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import streamlit as st
from PIL import Image
st.set_page_config(
page_title="Data Storyteller @furkanmtorun",
page_icon="./assets/munich.jpg",
layout="centered",
initial_sidebar_state="auto",
menu_items={
"Get Help": "https://furkanmtorun.github.io",
"Report a bug": "https://furkanmtorun.github.io",
"About": "# Welcome! This is an *extremely* cool web app!",
},
)
st.title("Become a data storyteller with :red[Streamlit]!")
st.write("Our true mentor in life is science. - `Atatürk`")
st.divider()
image = Image.open("./assets/Munich.jpg")
st.image(
image,
caption="Pictures are awesome like Munich. (📌 Herzogstand)",
)
st.divider()
st.subheader("Few metrics with 3 columns")
col1, col2, col3 = st.columns(3, gap="small")
col1.metric("Temperature", "20 °C", "1.2 °C")
col2.metric("Wind", "5 kmh", "-8%")
col3.metric("Humidity", "86%", "4%")
st.divider()
st.subheader("Other layouts and expander")
st.latex(r"""rmse = \sqrt{(\frac{1}{n})\sum_{i=1}^{n}(y_{i} - x_{i})^{2}}""")
with st.expander("Code block syntax highlighted and expander"):
code = """def hello():
print("Our true mentor in life is science. - Atatürk")"""
st.code(code, language="python", line_numbers=True)
st.divider()
st.subheader("Colorful texts")
st.markdown(
"""
:red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]
:gray[pretty] :rainbow[colors]."""
)
st.info("This is a purely informational message", icon="ℹ️")
st.error("This is an error", icon="🚨")
st.warning("This is a warning", icon="⚠️")
st.success("Thanks for waiting!", icon="✅")