Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -12,16 +12,6 @@ from st_click_detector import click_detector
|
|
12 |
# This lil dealio is my test of the new experiemntal primitives which promise to put cach in streamlit within striking distance of simulating cognitive episodic memory (personalized feelings about a moment through space time), and semantic memory (factual memories we are ready to share and communicate like your email address or physical address yo
|
13 |
|
14 |
|
15 |
-
# check if here for the first time then set the query
|
16 |
-
if 'query' not in st.session_state:
|
17 |
-
st.session_state['query'] = 'AI'
|
18 |
-
query = st.text_input("", value="artificial intelligence", key="query")
|
19 |
-
#st.session_state.query = 'AI'
|
20 |
-
st.write(st.session_state.query)
|
21 |
-
else:
|
22 |
-
query = st.text_input("", value=st.session_state["query"], key="query")
|
23 |
-
|
24 |
-
|
25 |
# callback to update query param on selectbox change
|
26 |
def update_params():
|
27 |
print("update1")
|
@@ -54,6 +44,14 @@ except: # catch exception and set query param to predefined value
|
|
54 |
|
55 |
|
56 |
# Text Input, check the query params set the text input to query value if in session
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
try:
|
58 |
query_params = st.experimental_get_query_params()
|
59 |
query_option = query_params['query'][0] #throws an exception when visiting http://host:port
|
|
|
12 |
# This lil dealio is my test of the new experiemntal primitives which promise to put cach in streamlit within striking distance of simulating cognitive episodic memory (personalized feelings about a moment through space time), and semantic memory (factual memories we are ready to share and communicate like your email address or physical address yo
|
13 |
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
# callback to update query param on selectbox change
|
16 |
def update_params():
|
17 |
print("update1")
|
|
|
44 |
|
45 |
|
46 |
# Text Input, check the query params set the text input to query value if in session
|
47 |
+
# check if here for the first time then set the query
|
48 |
+
if 'query' not in st.session_state:
|
49 |
+
#st.session_state['query'] = 'AI'
|
50 |
+
query = st.text_input("", value="artificial intelligence", key="query")
|
51 |
+
#st.session_state.query = 'AI'
|
52 |
+
st.write(st.session_state.query)
|
53 |
+
else:
|
54 |
+
query = st.text_input("", value=st.session_state["query"], key="query")
|
55 |
try:
|
56 |
query_params = st.experimental_get_query_params()
|
57 |
query_option = query_params['query'][0] #throws an exception when visiting http://host:port
|