Quantum spin Hall effect in Ta2M3Te5 (M=Pd,Ni)