Skip to content

Commit

Permalink
Attempt to generate graph dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiag committed May 28, 2021
1 parent 610feaa commit 230bdfa
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pages/predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def recommend(index: int, n: int=5) -> 'tuple[np.ndarray]':
### Parameters
index: index of song
n: number of recommendations to pull
returns: (dist, ind), array of distances, array of indeces for recommended songs. Includes
original song.
'''
Expand Down Expand Up @@ -76,7 +75,6 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
Converts input into the model's encoding, then runs it through the
K-NearestNeighbors models
Returns:
### Parameters
features: A list of all features required to run the model.
The model encoder expects these inputs in this order:
Expand All @@ -95,7 +93,6 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
tempo,
time_signature,
popularity
n_songs: number of songs to return.
'''
vec = model.encoder(np.array(features).reshape(1, -1))
Expand Down Expand Up @@ -197,7 +194,6 @@ def get_songs_via_features(features: list, n_songs: int=5) -> 'list[int]':
[
dcc.Markdown(
"""
**Instructions**: Adjust the attribute sliders. Your prediction outcome will update dynamically.
Attribute Definitions:
* **Duration** - Length of the song in ms
Expand Down

0 comments on commit 230bdfa

Please sign in to comment.