Objective: Currently, gastrointestinal problems claim the lives of about two million individuals every year throughout the world. Video endoscopy is one of the most important tools for detecting gastrointestinal diseases (GD). However, it has the disadvantage of producing a huge quantity of images that should be analysed by medical professionals, which demands more time. This makes manual diagnosis challenging, encouraging research into computer-assisted methods for accurately identifying all of the produced images in a short amount of time. The goal of this research is to develop anArtificial intelligence technique to classify the different diseases in gastrointenstine. Materials and Methods: In developing a framework for classifying gastrointestinal diseases, the proposed methodology is unique. VGG-19 and ResNet-50, two deep learning networks, were used to evaluate their ability to recognise a dataset of lower GD. To validate the proposed models, a Kvasir dataset of 3500 images was employed, comprising 500 images from each of the seven classes. Results: ResNet-50 had the greatest validation accuracy of 96.81%, recall of 95.28%, precision of 95%, and 94.85% of F1 score, whereas VGG-19 had the highest validation accuracy of 94.21%, recall of 94%, precision of 94.28%, and 94% of F1 score. Conclusions: The Convolutional neural network (CNN) was used to extract shape, colour, and texture features. Softmax assists in the classification of seven types of GD by passing these features into fully connected layers. Two models performed equally well and yielded promising results.