just turn the fish upside down in water(if big enough to see) or out of water if near 2"-3" and concentrate at the two spots of the fish just before starting of anal fin,there you will see two small dots like things if both are of same size then its probably a male but if one is bigger than the other it is a female and bigger hole is her ovispoter from where she will lay eggs on a cleaned surface but be careful not to take it out for more than 30 seconds
THANKS