Pathogenic gram-negative bacteria frequently carry genes encoding extended-spectrum beta-lactamases (ESBL) and/or carbapenemases. Of great concern are carbapenem resistant Escherichia coli, Klebsiella pneumoniae, Pseudomonas aeruginosa, and Acinetobacter baumannii. Despite the need for rapid AMR diagnostics globally, current molecular detection methods often require expensive equipment and trained personnel. Here, we present a novel machine-learning-aided platform for the rapid detection of ESBLs and carbapenemases using Loop-mediated isothermal Amplification (LAMP). The platform consists of (i) an affordable device for sample lysis, LAMP amplification, and visual fluorometric detection; (ii) a LAMP screening panel to detect the most common ESBL and carbapenemase genes; and (iii) a smartphone application for automated interpretation of results. Validation studies on clinical isolates and urine samples demonstrated percent positive and negative agreements above 95% for all targets. Accuracy, precision, and recall values of the machine learning model deployed in the smartphone application were all above 92%. Providing a simplified workflow, minimal operation training, and results in less than an hour, this study demonstrated the platform's feasibility for near-patient testing in resource-limited settings.IMPORTANCEExtended-spectrum beta-lactamases (ESBL) and carbapenemases confer resistance to third-generation cephalosporins and carbapenems in pathogenic Gram-negative bacteria such as Escherichia coli, Klebsiella pneumoniae, Pseudomonas aeruginosa, and Acinetobacter baumannii. Conventional antimicrobial susceptibility testing is based on phenotypic methods, and results can take several days to be obtained. Current genotypic detection methods can be rapid but require expensive equipment and trained personnel. In this study, we present a novel machine learning-aided platform for the rapid detection of ESBLs and carbapenemases using Loop-mediated isothermal Amplification (LAMP). The validation of the platform demonstrated percent positive and negative agreements above 95% for all targets. The newly developed platform provided a simplified workflow, minimal technical training, and results in less than an hour. This study demonstrated the platform's feasibility for rapid testing of ESBL and carbapenemases in bacteria and urine specimens.