Traditional spraying methods often result in overuse of chemicals, increasing costs and environmental risks. This study presents an AI-based variable-rate spraying system that integrates YOLOv3 for plant localization and a CNN model for disease classification. A custom CNN model was trained on a dataset of 2023 images (healthy (650), early blight (813), late blight (560)). The model gave a training accuracy of 92.7% and a validation accuracy of 92.8%, which was better as compared to pre-trained CNN models like VGG16, InceptionV3, and ResNet50. With the custom CNN model, precision, recall and F1 score were 1, 0.97 and 0.99, respectively for healthy leaves. A laboratory setup was fabricated to test the efficiency of the model. The setup consisted of a spraying trolley driven by a DC motor (850 W, 48 V, 3000 rpm, 60 Nm) and a Fieldstar SL 2205 pump (150 psi, 12 VDC) with a hollow cone nozzle for liquid application. Experimental results showed accurate plant detection and disease classification, allowing precise liquid delivery. The system achieved 83.3% prediction efficiency, 83.3% correct dose accuracy, and 100% spray coverage accuracy. This integrated approach reduces pesticide wastage, enhances crop protection, and contributes to sustainable agricultural practices.