In the case of ${ClF}_3$ molecule, there are three bond pairs and two lone pairs of electrons. As the lone pair-lone pair repulsion is more than lone pair-bond pair repulsion, which is more than bond pair-bond pair repulsion, the lone pairs occupy the equatorial positions as there are lesser repulsions at that position compared to the axial position in which there are more repulsions. Hence, it is T-shaped molecule.
In the case of ${NF}_3$ molecule, it has three bond pairs and one lone pair. The actual geometry of the molecule should be tetrahedral and due to lone pair-bond pair repulsions its shape is trigonal pyramidal.