working base version
Browse files- .cache +0 -1
- .gitignore +107 -1
- __pycache__/spotify_music_recommender.cpython-310.pyc +0 -0
- spotify_music_recommender.py +9 -9
.cache
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"access_token": "BQCcgc_4zWsgVUt9b9_r6ka5YkOS0KReZE6pPHKS0ELyM5K3KOfyyUyED87zZORxZbpPAGRxFEpQ8e24eQo6Mleh2xP8tZzVKkqnCDszX68thYCwqbc", "token_type": "Bearer", "expires_in": 3600, "expires_at": 1685645349}
|
|
|
|
.gitignore
CHANGED
@@ -1 +1,107 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
########################################################################
|
2 |
+
# Python - https://github.com/github/gitignore/blob/master/Python.gitignore
|
3 |
+
########################################################################
|
4 |
+
# Byte-compiled / optimized / DLL files
|
5 |
+
__pycache__/
|
6 |
+
*.py[cod]
|
7 |
+
*$py.class
|
8 |
+
|
9 |
+
#custom
|
10 |
+
secret_keys.py
|
11 |
+
.cache
|
12 |
+
|
13 |
+
# Distribution / packaging
|
14 |
+
build/
|
15 |
+
dist/
|
16 |
+
eggs/
|
17 |
+
.eggs/
|
18 |
+
*.egg-info/
|
19 |
+
*.egg
|
20 |
+
.prerelease-version
|
21 |
+
|
22 |
+
# Unit test / coverage reports
|
23 |
+
.coverage
|
24 |
+
.coverage\.*
|
25 |
+
.pytest_cache/
|
26 |
+
.mypy_cache/
|
27 |
+
test-reports
|
28 |
+
htmlcov
|
29 |
+
.hypothesis
|
30 |
+
|
31 |
+
# Test fixtures
|
32 |
+
cffi_bin
|
33 |
+
|
34 |
+
# Pyenv Stuff
|
35 |
+
.python-version
|
36 |
+
venv
|
37 |
+
|
38 |
+
# Autogenerated Protobufs
|
39 |
+
lib/streamlit/proto/*_pb2.py
|
40 |
+
lib/streamlit/proto/*_pb2.pyi
|
41 |
+
frontend/src/lib/proto.js
|
42 |
+
frontend/src/lib/proto.d.ts
|
43 |
+
|
44 |
+
########################################################################
|
45 |
+
# OSX - https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
|
46 |
+
########################################################################
|
47 |
+
.DS_Store
|
48 |
+
.DocumentRevisions-V100
|
49 |
+
.fseventsd
|
50 |
+
.Spotlight-V100
|
51 |
+
.TemporaryItems
|
52 |
+
.Trashes
|
53 |
+
.VolumeIcon.icns
|
54 |
+
.com.apple.timemachine.donotpresent
|
55 |
+
|
56 |
+
########################################################################
|
57 |
+
# node - https://github.com/github/gitignore/blob/master/Node.gitignore
|
58 |
+
########################################################################
|
59 |
+
# Logs
|
60 |
+
npm-debug.log*
|
61 |
+
yarn-debug.log*
|
62 |
+
yarn-error.log*
|
63 |
+
|
64 |
+
# Dependency directories
|
65 |
+
node_modules/
|
66 |
+
|
67 |
+
# ESLint
|
68 |
+
.eslintcache
|
69 |
+
|
70 |
+
# Coverage directory used by tools like istanbul
|
71 |
+
coverage/
|
72 |
+
|
73 |
+
########################################################################
|
74 |
+
# Streamlit
|
75 |
+
########################################################################
|
76 |
+
.streamlit/
|
77 |
+
lib/streamlit/static
|
78 |
+
streamlit-storage
|
79 |
+
|
80 |
+
# Data Files
|
81 |
+
**/uber-raw-data-sep14.csv
|
82 |
+
|
83 |
+
lib/Pipfile.lock
|
84 |
+
|
85 |
+
########################################################################
|
86 |
+
# JetBrains
|
87 |
+
########################################################################
|
88 |
+
.idea
|
89 |
+
|
90 |
+
########################################################################
|
91 |
+
# Cypress
|
92 |
+
########################################################################
|
93 |
+
frontend/cypress/downloads
|
94 |
+
frontend/cypress/videos
|
95 |
+
frontend/cypress/screenshots
|
96 |
+
__diff_output__
|
97 |
+
cypress.env.json
|
98 |
+
frontend/test_results
|
99 |
+
|
100 |
+
# Ignore screenshots that don't get used in CircleCI
|
101 |
+
frontend/cypress/snapshots/darwin
|
102 |
+
frontend/cypress/snapshots/linux/1x
|
103 |
+
|
104 |
+
########################################################################
|
105 |
+
# VSCode
|
106 |
+
########################################################################
|
107 |
+
.vscode/
|
__pycache__/spotify_music_recommender.cpython-310.pyc
DELETED
Binary file (7.81 kB)
|
|
spotify_music_recommender.py
CHANGED
@@ -53,10 +53,10 @@ def get_pipeline_data_number_cols():
|
|
53 |
|
54 |
|
55 |
def find_song(name, year):
|
56 |
-
if os.path.isfile("
|
57 |
-
import
|
58 |
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
59 |
-
client_id=
|
60 |
else:
|
61 |
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
62 |
client_id=os.environ.get("client_id"), client_secret=os.environ.get("client_secret")))
|
@@ -84,10 +84,10 @@ def find_song(name, year):
|
|
84 |
|
85 |
def find_song_uri(name, year):
|
86 |
# Create a Spotify client object.
|
87 |
-
if os.path.isfile("
|
88 |
-
import
|
89 |
client = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
90 |
-
client_id=
|
91 |
else:
|
92 |
client = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
93 |
client_id=os.environ.get("client_id"), client_secret=os.environ.get("client_secret")))
|
@@ -111,9 +111,9 @@ def format_song(song_data, number_cols):
|
|
111 |
|
112 |
def get_response(text):
|
113 |
|
114 |
-
if os.path.isfile("
|
115 |
-
import
|
116 |
-
openai.api_key =
|
117 |
else:
|
118 |
openai.api_key = os.environ.get("openai_api_key")
|
119 |
|
|
|
53 |
|
54 |
|
55 |
def find_song(name, year):
|
56 |
+
if os.path.isfile(".\secret_keys.py"):
|
57 |
+
import secret_keys
|
58 |
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
59 |
+
client_id=secret_keys.client_id, client_secret=secret_keys.client_secret))
|
60 |
else:
|
61 |
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
62 |
client_id=os.environ.get("client_id"), client_secret=os.environ.get("client_secret")))
|
|
|
84 |
|
85 |
def find_song_uri(name, year):
|
86 |
# Create a Spotify client object.
|
87 |
+
if os.path.isfile(".\secret_keys.py"):
|
88 |
+
import secret_keys
|
89 |
client = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
90 |
+
client_id=secret_keys.client_id, client_secret=secret_keys.client_secret))
|
91 |
else:
|
92 |
client = spotipy.Spotify(auth_manager=SpotifyClientCredentials(
|
93 |
client_id=os.environ.get("client_id"), client_secret=os.environ.get("client_secret")))
|
|
|
111 |
|
112 |
def get_response(text):
|
113 |
|
114 |
+
if os.path.isfile(".\secret_keys.py"):
|
115 |
+
import secret_keys
|
116 |
+
openai.api_key = secret_keys.openai_api_key
|
117 |
else:
|
118 |
openai.api_key = os.environ.get("openai_api_key")
|
119 |
|