SPT: Spectral Transformer for Red Giant Stars Age and Mass Estimation