Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,9 @@ def extract_track_id_from_url(url):
|
|
42 |
|
43 |
|
44 |
def app():
|
45 |
-
|
|
|
|
|
46 |
# Step 1: User Authorization
|
47 |
if st.session_state.get('code') is None:
|
48 |
auth_params = {
|
@@ -70,6 +72,8 @@ def app():
|
|
70 |
st.session_state['access_token'] = token_response.get('access_token')
|
71 |
|
72 |
if 'access_token' in st.session_state:
|
|
|
|
|
73 |
st.write("Enter a Spotify Track URL or URI to get its audio features.")
|
74 |
track_input = st.text_input("Spotify Track URL/URI", "")
|
75 |
traindata = []
|
|
|
42 |
|
43 |
|
44 |
def app():
|
45 |
+
if st.session_state.get('code') is not None:
|
46 |
+
if st.button("Go Back"):
|
47 |
+
st.session_state['code'] = None
|
48 |
# Step 1: User Authorization
|
49 |
if st.session_state.get('code') is None:
|
50 |
auth_params = {
|
|
|
72 |
st.session_state['access_token'] = token_response.get('access_token')
|
73 |
|
74 |
if 'access_token' in st.session_state:
|
75 |
+
if st.button("Go Back"):
|
76 |
+
|
77 |
st.write("Enter a Spotify Track URL or URI to get its audio features.")
|
78 |
track_input = st.text_input("Spotify Track URL/URI", "")
|
79 |
traindata = []
|