julien-c HF staff commited on
Commit
7bac603
1 Parent(s): 1e0c3b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -35,7 +35,7 @@ def img_to_bytes(img_path):
35
 
36
  def cs_sidebar():
37
 
38
- st.sidebar.header('Streamlit cheat sheet')
39
 
40
  st.sidebar.markdown('''
41
  <small>Summary of the [docs](https://docs.streamlit.io/en/stable/api.html), as of [Streamlit v0.81.0](https://www.streamlit.io/).</small>
@@ -51,7 +51,7 @@ def cs_sidebar():
51
  st.sidebar.markdown('__Add widgets to sidebar__')
52
  st.sidebar.code('''
53
  st.sidebar.<widget>
54
- >>> a = st.sidebar.radio(\'R:\',[1,2])
55
  ''')
56
 
57
  st.sidebar.markdown('__Command line__')
@@ -87,7 +87,7 @@ def cs_body():
87
 
88
  col1.subheader('Magic commands')
89
  col1.code('''# Magic commands implicitly `st.write()`
90
- \'\'\' _This_ is some __Markdown__ \'\'\'
91
  a=3
92
  'dataframe:', data
93
  ''')
@@ -98,7 +98,7 @@ a=3
98
  col1.code('''
99
  st.text('Fixed width text')
100
  st.markdown('_Markdown_') # see *
101
- st.latex(r\'\'\' e^{i\pi} + 1 = 0 \'\'\')
102
  st.write('Most objects') # df, err, func, keras!
103
  st.write(['st', 'is <', 3]) # see *
104
  st.title('My title')
@@ -163,7 +163,7 @@ st.time_input('Time entry')
163
  st.file_uploader('File uploader')
164
  st.color_picker('Pick a color')
165
  ''')
166
- col2.write('Use widgets\' returned values in variables:')
167
  col2.code('''
168
  >>> for i in range(int(st.number_input('Num:'))): foo()
169
  >>> if st.sidebar.selectbox('I:',['f']) == 'f': b()
 
35
 
36
  def cs_sidebar():
37
 
38
+ st.sidebar.header('Streamlit cheat sheet FTW')
39
 
40
  st.sidebar.markdown('''
41
  <small>Summary of the [docs](https://docs.streamlit.io/en/stable/api.html), as of [Streamlit v0.81.0](https://www.streamlit.io/).</small>
 
51
  st.sidebar.markdown('__Add widgets to sidebar__')
52
  st.sidebar.code('''
53
  st.sidebar.<widget>
54
+ >>> a = st.sidebar.radio(\\'R:\\',[1,2])
55
  ''')
56
 
57
  st.sidebar.markdown('__Command line__')
 
87
 
88
  col1.subheader('Magic commands')
89
  col1.code('''# Magic commands implicitly `st.write()`
90
+ \\'\\'\\' _This_ is some __Markdown__ \\'\\'\\'
91
  a=3
92
  'dataframe:', data
93
  ''')
 
98
  col1.code('''
99
  st.text('Fixed width text')
100
  st.markdown('_Markdown_') # see *
101
+ st.latex(r\\'\\'\\' e^{i\\pi} + 1 = 0 \\'\\'\\')
102
  st.write('Most objects') # df, err, func, keras!
103
  st.write(['st', 'is <', 3]) # see *
104
  st.title('My title')
 
163
  st.file_uploader('File uploader')
164
  st.color_picker('Pick a color')
165
  ''')
166
+ col2.write('Use widgets\\' returned values in variables:')
167
  col2.code('''
168
  >>> for i in range(int(st.number_input('Num:'))): foo()
169
  >>> if st.sidebar.selectbox('I:',['f']) == 'f': b()