-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home.py
42 lines (34 loc) · 1.41 KB
/
Home.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
import streamlit as st
import streamlit.components.v1 as components
def quiz():
question = ":shamrock: Who is the author of the showed equation?"
options = ["Albert Einstein", "Paul Dirac", "Robert Oppenheimer"]
correct_answer = "Paul Dirac"
selected_answer = st.radio(question, options)
if st.button("Answer"):
if selected_answer == correct_answer:
st.success("Correct!", icon="✅")
else:
st.error("Incorrect. Please try again.", icon="🚨")
st.set_page_config(
page_title='Python • Streamlit | Home',
page_icon=":sparkles:",
layout='wide',
initial_sidebar_state='expanded',
menu_items={
'Get Help': 'https://github.com/sbdeveloper90/python-streamlit-api/wiki',
'Report a bug': "https://github.com/sbdeveloper90/python-streamlit-api/issues",
'About': "# Python • Streamlit\n### This is an *extremely* cool app!"
}
)
with st.sidebar:
quiz()
components.iframe("https://my.spline.design/streamlitlogo-eaa8c1fc0230ef4c8fc84a2b482f4f6d/", height=200)
st.markdown('<h1 style="color:#3DD56D; text-align:center">Python Streamlit API & Data Visualization</h1>', unsafe_allow_html=True)
st.markdown('<h3 style="text-align:center">Python Streamlit example app for API calls and data visualization</h3>', unsafe_allow_html=True)
st.markdown('#')
st.markdown('#')
st.markdown('#')
st.latex(r'''
\LARGE(\delta + m)\psi = 0
''')