A machine learning-based fast seismic risk assessment framework is proposed to ease the computational burden in estimating the potential earthquake-induced loss of a building during its intended life. Both the hazard parameters of sites and structural parameters of buildings were incorporated as inputs. The continuous risk values and discrete risk levels were used as outputs for the regression and classification tasks of supervised learning, respectively. A proof-of-concept study of steel frames proved the feasibility of the proposed approach. Artificial neural networks achieved the lowest root mean square error of 0.0051 for regression and the highest accuracy of 96.8% for classification.