diff --git a/Recommendation.py b/Recommendation.py new file mode 100644 index 0000000..ffd4ea0 --- /dev/null +++ b/Recommendation.py @@ -0,0 +1,106 @@ +from Movie_Data import * +fir=int(input(""" Please Select: +Press 1 For all Movies +Press 2 For selecting Genres""")) + +if fir==1: + print(new_df) + la=input("Do you Want to see Overview of a Movie (Yes/No): " ) + lm=la.lower() + if lm=="yes": + mo=input("please Enter Movie Name: ") + for i in new_df['title']: + for j in new_df["Movie_Info"]: + if mo in i: + print(i) + print(j) +else: + gen=input("Please Enter Genre: ") + +def actionMovies(): + for i in new_df['genres']: + for j in new_df['title']: + if "Action" in i: + print(i) + print(j) + +def ComedyMovies(): + for i in new_df['genres']: + for j in new_df['title']: + if "Comedy" in i: + print(i) + print(j) + +def fantasy(): + for i in new_df['genres']: + for j in new_df['title']: + if "Fantasy" in i: + print(i) + print(j) + +def Adven(): + for i in new_df['genres']: + for j in new_df['title']: + if "Adventure" in i: + print(i) + print(j) + +def animation(): + for i in new_df['genres']: + for j in new_df['title']: + if "Animation" in i: + print(i) + print(j) + +#romance +def romance(): + for i in new_df['genres']: + for j in new_df['title']: + if "Romance" in i: + print(i) + print(j) + + +def drama(): + for i in new_df['genres']: + for j in new_df['title']: + if "Drama" in i: + print(i) + print(j) + +def family(): + for i in new_df['genres']: + for j in new_df['title']: + if "Family" in i: + print(i) + print(j) + +def hist(): + for i in new_df['genres']: + for j in new_df['title']: + if "History" in i: + print(i) + print(j) + +l=gen.lower() + +if l== "action": + actionMovies() +elif l== "comedy": + ComedyMovies() +elif l== "fantasy": + fantasy() +elif l== "adventure": + Adven() +elif l== "animation": + animation() +elif l== "romance": + romance() +elif l== "drama": + drama() +elif l== "family": + family() +elif l== "history": + hist() +else: + print("Sorry Your genre was Not found")