If you haven't introduced yourself as your post says then nah man, it's a bad idea.
It's not a bad thing to ask someone out that goes to your gym, but you'd need to know them/speak to them for a while before you would tbh. Just asking someone randomly might make them feel quite uncomfy.