mudassir032 commited on
Commit
913f7bf
·
verified ·
1 Parent(s): c092ac3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -19,9 +19,11 @@ similarity_matrix = calculate_similarity_matrix(genre_df)
19
  def random_selection(movies):
20
  random_movies = movies['title'].sample(5).to_numpy()
21
  return random_movies
22
- random_movies = random_selection(movies_df)
23
-
24
- option = st.selectbox("Select",random_movies)
25
-
26
- st.write(f'You selected: {option}')
27
-
 
 
 
19
  def random_selection(movies):
20
  random_movies = movies['title'].sample(5).to_numpy()
21
  return random_movies
22
+ movie = st.text_input("Search for movie")
23
+ if not movie:
24
+ random_movies = random_selection(movies_df)
25
+
26
+ option = st.selectbox("Select",random_movies)
27
+
28
+ st.write(f'You selected: {option}')
29
+