Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,14 +43,14 @@ def extract_track_id_from_url(url):
|
|
| 43 |
def app():
|
| 44 |
|
| 45 |
# Step 1: User Authorization
|
| 46 |
-
if st.session_state.get('code') is None or st.session_state
|
| 47 |
auth_params = {
|
| 48 |
'client_id': CLIENT_ID,
|
| 49 |
'response_type': 'code',
|
| 50 |
'redirect_uri': REDIRECT_URI,
|
| 51 |
'scope': 'user-read-private', # Modify as per your required scopes
|
| 52 |
}
|
| 53 |
-
st.session_state['
|
| 54 |
st.write('Please log in to Spotify')
|
| 55 |
st.markdown(f"[Log In]({AUTH_URL}?{urlencode(auth_params)})", unsafe_allow_html=True)
|
| 56 |
else:#
|
|
|
|
| 43 |
def app():
|
| 44 |
|
| 45 |
# Step 1: User Authorization
|
| 46 |
+
if st.session_state.get('code') is None or "first_time_load" is not in st.session_state:
|
| 47 |
auth_params = {
|
| 48 |
'client_id': CLIENT_ID,
|
| 49 |
'response_type': 'code',
|
| 50 |
'redirect_uri': REDIRECT_URI,
|
| 51 |
'scope': 'user-read-private', # Modify as per your required scopes
|
| 52 |
}
|
| 53 |
+
st.session_state['first_time_load'] =
|
| 54 |
st.write('Please log in to Spotify')
|
| 55 |
st.markdown(f"[Log In]({AUTH_URL}?{urlencode(auth_params)})", unsafe_allow_html=True)
|
| 56 |
else:#
|