The structures are shown in the image
.The lone electrons of N in pyrrole is delocalized . It is part of the Pi system, thus involved in aromatization . This L.P is no longer available for a proton hence it is a weak base.
One the other hand, aniline is already aromatic. Through the lone pair of e− of −NH2 group of aniline is delocalized over the benzene ring, it is not involved in aromatizetion . This pair of lone electron still available for a proton, hence aniline is stronger base than pyrrole.