Artificial intelligence methodologies with deep learning models proved very effective in many areas. This research focuses on using deep learning models for the detection of skin cancer melanoma in patients at an early stage. The growth of a malignant melanocytic tumor is the primary cause of melanoma, a deadly form of skin cancer. The most dangerous type of cancer, known as melanoma, is brought on by melanocytes, which produce pigment. Seventy-five percent of skin cancer fatalities are caused by melanoma. Only 15% of patients who have survived over the previous five years, according to a review of the survival rate, have received chronic treatment. The manual system is the issue. The mole has a maximum of six colors, thus the image is troublesome since it has a variety of tints and is hard for humans to distinguish. As a result, we created a model utilizing flask and a pre-trained deeplearning model to handle this issue. The suggested model is optimized using the SGD, RMSprop, Adam, Agagrad, Adadelta, and Nadam optimizers. According to testing, the suggested CNN model with the Adam optimizer performs the best at categorizing the dataset of skin cancer lesions. Also it gives the result specifically to the seven types of the skin cancer with their possible chances in percentage. It achieved a training accuracy of 99.73 % and a testing accuracy of 96.53, which is better than the previous results. In order to lower the mortality rate, this research intends to identify an early treatment for people with skin cancer.