jchen8000 commited on
Commit
dd07bd3
·
verified ·
1 Parent(s): 02f4def

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -30,6 +30,9 @@ indices = pd.Series(movies.index, index=movies['title']).drop_duplicates()
30
 
31
  # Function that takes in movie title as input and outputs most similar movies
32
  def get_recommendations(title, cosine_sim=cosine_sim):
 
 
 
33
  # Get the index of the movie that matches the title
34
  idx = indices[title]
35
 
 
30
 
31
  # Function that takes in movie title as input and outputs most similar movies
32
  def get_recommendations(title, cosine_sim=cosine_sim):
33
+ if not title:
34
+ return "No movie selected. Please select one from the dropdown."
35
+
36
  # Get the index of the movie that matches the title
37
  idx = indices[title]
38