Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -232,6 +232,11 @@ with gr.Blocks() as iface:
|
|
232 |
description="Select a movie to get recommendations based on content filtering.")
|
233 |
|
234 |
with gr.Tab("Collaborative Filtering"):
|
|
|
|
|
|
|
|
|
|
|
235 |
gr.Interface(fn=recommend_movies_cf,
|
236 |
inputs=gr.Dropdown(movie_list, label=f"Select a Movie (Total movies: {total_movies}, randomly list {input_count} for demo purpose.)"),
|
237 |
outputs=[gr.Textbox(label="Recommended Movies:")],
|
@@ -239,6 +244,7 @@ with gr.Blocks() as iface:
|
|
239 |
description="Select a movie to get recommendations based on collaborative filtering.")
|
240 |
|
241 |
with gr.Tab("Collaborative Filtering with Neural Network"):
|
|
|
242 |
gr.Interface(fn=recommend_movies_cfnn,
|
243 |
inputs=gr.Dropdown(movie_list, label=f"Select a Movie (Total movies: {total_movies}, randomly list {input_count} for demo purpose.)"),
|
244 |
outputs=[gr.Textbox(label="Recommended Movies:")],
|
|
|
232 |
description="Select a movie to get recommendations based on content filtering.")
|
233 |
|
234 |
with gr.Tab("Collaborative Filtering"):
|
235 |
+
gr.Markdown("""# Movie Recommender - Item-Based Collaborative Filtering
|
236 |
+
* Create a movie-user matrix where rows represent movies and columns represent users, each cell contains the rating a user gave to a movie, or 0 if no rating exists.
|
237 |
+
* Calculate the cosine similarity between movies based on their rating patterns, results in a movie-movie similarity matrix.
|
238 |
+
* For a given movie, find the most similar movies based on this similarity matrix, and recommend these movies.
|
239 |
+
""")
|
240 |
gr.Interface(fn=recommend_movies_cf,
|
241 |
inputs=gr.Dropdown(movie_list, label=f"Select a Movie (Total movies: {total_movies}, randomly list {input_count} for demo purpose.)"),
|
242 |
outputs=[gr.Textbox(label="Recommended Movies:")],
|
|
|
244 |
description="Select a movie to get recommendations based on collaborative filtering.")
|
245 |
|
246 |
with gr.Tab("Collaborative Filtering with Neural Network"):
|
247 |
+
gr.Markdown("A Neural Network is used to predict the missing values in the movie-user matrix, which should improve our collaborative filtering recommendations.")
|
248 |
gr.Interface(fn=recommend_movies_cfnn,
|
249 |
inputs=gr.Dropdown(movie_list, label=f"Select a Movie (Total movies: {total_movies}, randomly list {input_count} for demo purpose.)"),
|
250 |
outputs=[gr.Textbox(label="Recommended Movies:")],
|