Spaces:
Sleeping
Sleeping
Commit
·
c3dac37
1
Parent(s):
57e0a67
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,6 @@ import os
|
|
5 |
|
6 |
# Initial page config
|
7 |
|
8 |
-
st.set_page_config(
|
9 |
-
page_title='Streamlit cheat sheet',
|
10 |
-
layout="wide",
|
11 |
-
initial_sidebar_state="expanded",
|
12 |
-
)
|
13 |
-
|
14 |
-
|
15 |
# Set org ID and API key
|
16 |
openai.api_key = os.environ['TOKEN']
|
17 |
|
@@ -72,38 +65,9 @@ def cs_sidebar():
|
|
72 |
<small>Summary of the [docs](https://docs.streamlit.io/en/stable/api.html), as of [Streamlit v1.8.0](https://www.streamlit.io/).</small>
|
73 |
''', unsafe_allow_html=True)
|
74 |
|
75 |
-
st.sidebar.markdown('
|
76 |
-
|
77 |
-
st.sidebar.code('$ pip install streamlit')
|
78 |
-
|
79 |
-
st.sidebar.markdown('Import convention')
|
80 |
-
st.sidebar.code('>>> import streamlit as st')
|
81 |
-
|
82 |
-
st.sidebar.markdown('__Add widgets to sidebar__')
|
83 |
-
st.sidebar.code('''
|
84 |
-
st.sidebar.<widget>
|
85 |
-
>>> a = st.sidebar.radio(\'R:\',[1,2])
|
86 |
-
''')
|
87 |
-
|
88 |
-
st.sidebar.markdown('__Command line__')
|
89 |
-
st.sidebar.code('''
|
90 |
-
$ streamlit --help
|
91 |
-
$ streamlit run your_script.py
|
92 |
-
$ streamlit hello
|
93 |
-
$ streamlit config show
|
94 |
-
$ streamlit cache clear
|
95 |
-
$ streamlit docs
|
96 |
-
$ streamlit --version
|
97 |
-
''')
|
98 |
-
|
99 |
-
st.sidebar.markdown('__Pre-release features__')
|
100 |
-
st.sidebar.markdown('[Beta and experimental features](https://docs.streamlit.io/library/advanced-features/prerelease#beta-and-experimental-features)')
|
101 |
-
st.sidebar.code('''
|
102 |
-
pip uninstall streamlit
|
103 |
-
pip install streamlit-nightly --upgrade
|
104 |
-
''')
|
105 |
|
106 |
-
st.sidebar.markdown('
|
107 |
|
108 |
return None
|
109 |
|
@@ -113,7 +77,6 @@ pip install streamlit-nightly --upgrade
|
|
113 |
|
114 |
def cs_body():
|
115 |
|
116 |
-
st.set_page_config(page_title="Tutor", page_icon=":heavy_plus_sign:")
|
117 |
st.markdown("<h3 style='text-align: center;'> Tutor Session with Mary B (Tutor) </h3>", unsafe_allow_html=True)
|
118 |
|
119 |
if "openai_model" not in st.session_state:
|
|
|
5 |
|
6 |
# Initial page config
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# Set org ID and API key
|
9 |
openai.api_key = os.environ['TOKEN']
|
10 |
|
|
|
65 |
<small>Summary of the [docs](https://docs.streamlit.io/en/stable/api.html), as of [Streamlit v1.8.0](https://www.streamlit.io/).</small>
|
66 |
''', unsafe_allow_html=True)
|
67 |
|
68 |
+
st.sidebar.markdown('Context')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
st.sidebar.markdown('Right now are you talking as Becky')
|
71 |
|
72 |
return None
|
73 |
|
|
|
77 |
|
78 |
def cs_body():
|
79 |
|
|
|
80 |
st.markdown("<h3 style='text-align: center;'> Tutor Session with Mary B (Tutor) </h3>", unsafe_allow_html=True)
|
81 |
|
82 |
if "openai_model" not in st.session_state:
|