What is better?

I need some help on this. I can’t decide between these two options.
/Quad-core i5, 8 gigs of DDR3 ram, rx 580/
or
/Six-core i7, 16 gigs of DDR4 ram, Radeon Pro 555x/ (it is like 40% weaker than an gtx 1050)
I can’t decide between more cores and more ram, or better GPU. I appreciate any help I can get. Thanks.,