Diabetic retinopathy (DR) is one of the most common causes of vision loss. Although preventable and curable at early-stage, most diabetic patients are diagnosed with DR very late because the clinical method for the detection can be very tedious and may require highly technical analysis and it is time-consuming. Therefore, it is very important to detect diabetic retinopathy at an early stage to seek treatments and prevention measures. In this work, a Machine Learning model based on Convolutional Neural Network (CNN) and Random Forest were developed to detect retinopathy in diabetic patients. The dataset which comprises of 5 classes and 20,000 instances of images obtained from Kaggle. 5 disease severity levels were defined as: 0 for ‘no apparent retinopathy’, 1 for ‘mild’, 2 for ‘moderate’, 3 for ‘severe non-proliferative DR’, and 4 for ‘proliferative DR’. The dataset was divided into the training set and the testing set at a 70% and 30% value. After that, the training data is fed into the machine for training, and the test set is compared to the training set to ensure correctness. The performance accuracy between the training and test set are calculated, CNN has an accuracy of 73.44%, and Random Forest has an accuracy of 68.75%. A system was also built in which the model developed using CNN (since it outperforms Random Forest) was integrated. This work has narrowed the gap between clinical and machine learning methods for identifying diabetic retinopathy. The use of machine processes to diagnose diabetic retinopathy has given the medical sector a substantial improvement, and it is also helping to reduce the rate at which diabetic people lose their vision.