I am trying to place my text and image using wrapfig in Latex. However, I am not able to follow the syntax properly, and thus getting a dis-oriented alignment.
\usepackage{graphicx,wrapfig,lipsum}
\begin{document}
\heading{Safe SSL}
\begin{wrapfigure}{r}{8cm}
\caption{Safe SSL check}\label{wrap-fig:1}
\includegraphics[width=5.5cm]{SafeSSL.png}
\end{wrapfigure}
{We trained both the semi-supervised and supervised models by splitting the data with varying test set sizes and then compared the efficiency of SSL to the supervised approach and concluded that the "Safe SSL" assumption holds as it performed better for the semi-supervised model at the split test data.
\par}
\end{document}
I get the following result rendered. Any fixes to this?

\documentclass...to\end{document}) that we can compile that shows your problem. – Peter Wilson Jun 17 '21 at 16:38\heading{}? Probably you need @DavidCarlisle\clearwfhere: https://tex.stackexchange.com/a/238683/38080 – Rmano Jun 17 '21 at 17:02We trained....? – David Carlisle Jun 17 '21 at 17:45example-imageas the image as it is available for tests. It is very hard to guess the issue just from a fragment. – David Carlisle Jun 17 '21 at 19:03