Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Movie-ChatBot/Recommendation.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
106 lines (93 sloc)
2.36 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |