Generalized emergent dark energy model and the Hubble constant tension