Real-time Flare Prediction Based on Distinctions between Flaring and Non-flaring Active Region Spectra