Open kayleehou opened 1 year ago
I also had a problem where no matter what the user was inputting, the same five songs would be outputted, I edited the cosine similarity function and now when I input different songs, different outputs are outputted. Additionally, it was counting the song inputted as the first recommendation, I changed the indices and now it starts with the second recommended song.
My big Accomplishment this week is getting a successful input:
This is a very simple prototype, but it is functioning locally. The next steps would be deployment and I'm sure there will be CORS errors :'( as well as adding a more visually appealing interface
Another thing that I accomplished this week was converting our csv file into an sqlite database and then converting the database into a table with Pandas dataframe. Finally converting the dataframe into a list of dictionaries (JSON), which runs locally
The big problem I had this week was not being able to get our API running, I thought it was a problem with flask endpoints or my model so I was trying to debug that for a long time, but then I had to step back and looking at the problem from a big lens and narrowing in on the error. Once I did that, I realized the problem was not with my python file but with my data. The data needed to be cleaned, some of the data had commas in it, which was causing this error:
ValueError: invalid literal for int() with base 10: '
I realized with the help of ChatGPT, that I needed to clean up my data so I added this block of code that converted any commas into integers:
Finally, I was able to a working frontend, although it is very simple. Full stack, includes fetch of backend:
Accounts for errors:
Also, I want to try incorporating a merge sort into this code.