Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,12 +47,9 @@ cloud_button_style = """
|
|
47 |
st.markdown(cloud_button_style, unsafe_allow_html=True)
|
48 |
|
49 |
def cloud_button(label, key):
|
50 |
-
button_html = f'<button
|
51 |
-
|
52 |
-
if button_click:
|
53 |
-
st.session_state[key] = not st.session_state.get(key, False)
|
54 |
return st.session_state.get(key, False)
|
55 |
-
|
56 |
|
57 |
# Step 1: Clone the Dataset Repository
|
58 |
repo = Repository(
|
|
|
47 |
st.markdown(cloud_button_style, unsafe_allow_html=True)
|
48 |
|
49 |
def cloud_button(label, key):
|
50 |
+
button_html = f'<button onclick="javascript:window.parent.postMessage({{\'setSessionState\': {{\'{key}\': true}}}}, \'*\');" class="cloud-button">{label}</button>'
|
51 |
+
st.markdown(button_html, unsafe_allow_html=True)
|
|
|
|
|
52 |
return st.session_state.get(key, False)
|
|
|
53 |
|
54 |
# Step 1: Clone the Dataset Repository
|
55 |
repo = Repository(
|