shikharyashmaurya commited on
Commit
53f5f45
1 Parent(s): ad3abe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import pickle
2
  import streamlit as st
3
  import requests
 
 
4
 
5
  def fetch_poster(movie_id):
6
  url = "https://api.themoviedb.org/3/movie/{}?api_key=8265bd1679663a7ea12ac168da84d2e8&language=en-US".format(movie_id)
@@ -25,8 +27,8 @@ def recommend(movie):
25
 
26
 
27
  st.header('Movie Recommender System')
28
- movies = pickle.load(open('movie_list.pkl','rb'))
29
- similarity = pickle.load(open('similarity.pkl','rb'))
30
 
31
  movie_list = movies['title'].values
32
  selected_movie = st.selectbox(
 
1
  import pickle
2
  import streamlit as st
3
  import requests
4
+ import numpy as np
5
+ import pandas as pd
6
 
7
  def fetch_poster(movie_id):
8
  url = "https://api.themoviedb.org/3/movie/{}?api_key=8265bd1679663a7ea12ac168da84d2e8&language=en-US".format(movie_id)
 
27
 
28
 
29
  st.header('Movie Recommender System')
30
+ movies = pd.read_pickle('movie_list.pkl')
31
+ similarity = pd.read_pickle('similarity.pkl.pkl')
32
 
33
  movie_list = movies['title'].values
34
  selected_movie = st.selectbox(