Skip to content

Commit

Permalink
sliders have finer step sizes now
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithms committed May 28, 2021
1 parent 19c0c93 commit 5043a83
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions pages/predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
min=0,
max=1,
value=0.5,
step=0.1,
step=0.01,
),
dcc.Markdown('', id='duration-slider-container'),

Expand All @@ -137,7 +137,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
id='danceability-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='danceability-slider-container'),
Expand All @@ -147,7 +147,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
id='energy-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='energy-slider-container'),
Expand All @@ -157,7 +157,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
id='key-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='key-slider-container'),
Expand All @@ -167,7 +167,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
id='loudness-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='loudness-slider-container'),
Expand All @@ -177,7 +177,7 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
id='mode-slider',
min=0,
max=1,
step=1,
step=.1,
value=0.5,
),
dcc.Markdown('', id='mode-slider-container'),
Expand Down Expand Up @@ -395,7 +395,7 @@ def update_list(duration_ms,
id='acousticness-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='acousticness-slider-container'),
Expand All @@ -405,7 +405,7 @@ def update_list(duration_ms,
id='instrumentalness-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='instrumentalness-slider-container'),
Expand All @@ -415,7 +415,7 @@ def update_list(duration_ms,
id='liveness-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='liveness-slider-container'),
Expand All @@ -425,7 +425,7 @@ def update_list(duration_ms,
id='valence-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='valence-slider-container'),
Expand All @@ -435,7 +435,7 @@ def update_list(duration_ms,
id='tempo-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='tempo-slider-container'),
Expand All @@ -455,7 +455,7 @@ def update_list(duration_ms,
id='popularity-slider',
min=0,
max=1,
step=0.1,
step=0.01,
value=0.5,
),
dcc.Markdown('', id='popularity-slider-container'),
Expand All @@ -477,4 +477,4 @@ def update_recommended(data):
return [song.name + '\n' for song in get_songs(data)]


layout = [dbc.Row([column3, column2,rec_col]), dbc.Row(row1)]
layout = [dbc.Row([column3, column2,rec_col]), dbc.Row(row1)]

0 comments on commit 5043a83

Please sign in to comment.