This study developed a machine learning model to diagnose celiac disease (CD) from duodenal biopsy images, aiming to improve diagnostic consistency among pathologists. Trained on over 3,000 whole-slide images from multiple hospitals, the model achieved over 95% accuracy, sensitivity, and specificity, with an AUC above 99% when tested on data from a new hospital. Its performance matched that of expert pathologists, suggesting it could streamline and enhance CD diagnosis in clinical practice.