In the find_matched_keywords function, you're using the cosine_similarity function from the sklearn library to calculate the similarity between the user input and the keywords. This function can be slow for large datasets. You might want to consider using a more efficient similarity metric, such as the Jaccard similarity or the Euclidean distance.
In the find_matched_keywords function, you're using the cosine_similarity function from the sklearn library to calculate the similarity between the user input and the keywords. This function can be slow for large datasets. You might want to consider using a more efficient similarity metric, such as the Jaccard similarity or the Euclidean distance.