Does the forgetful functor from $\mathbf{TopGrp}$ to $\mathbf{Top}$ admit a left adjoint? Let TopGrp be the category of topological groups (not necessarily $T_0$) and Top the category of topological spaces. Does the forgetful functor  $U:\mathbf{TopGrp}\to\mathbf{Top}$ admit a left adjoint?
To be concrete, given an arbitrary topological space $X$, my question is that, can we find a topological group $\Gamma X$ and a continuous map $\iota:X\to\Gamma X$ such that, for any topological group $G$ and any continuous map $f:X\to G$, there exists a unique continuous group homomorphism $f^\prime:\Gamma X\to G$ satisfying $f=f^\prime\circ\iota$?
 A: Let $\mathcal{F}$ be a set of continuous maps from $X$ such that $cod(f)$ is a topological group for each $f ∈ \mathcal{F}$ and every continuous map from $X$ to a topological group factors thought some map from $\mathcal{F}$. Such set exists since it is enough to consider maps whose images generate the codomain group, so their cardinalities are bounded. Consider $i: X \to ∏_{f ∈ \mathcal{F}} cod(f)$ defined as $i(x)(f) = f(x)$.
Clearly, $∏_{f ∈ \mathcal{F}} cod(f)$ is a topological group and $π_f \circ i$ is continuous for each $f ∈ \mathcal{F}$, so $i$ is continuous.
Every continuous $g: X \to G$ factors through some $f ∈ \mathcal{F}$, and for $g'$ defined as $g'(α) = π_f(α) = α(f): X \to cod(f) ⊆ G$ we have $g'(i(x)) = i(x)(f) = f(x) = g(x)$. Clearly, $g'$ is continuous homorphism.
It is enough to consider the subgroup of $∏_{f ∈ \mathcal{F}} cod(f)$ generated by $i[X]$, on which we have also the uniqueness of the extension.
We may also observe, that $i$ is always injective and it is a topological embedding if $X$ is completely regular.
A: If $\mathcal{C}$ is a cocomplete cartesian closed category, then the forgetful functor $\mathsf{Grp}(\mathcal{C}) \to \mathcal{C}$ has a left adjoint. More generally, if $\tau$ is any type of algebraic structures, the forgetful functor $\mathsf{Alg}_{\tau}(\mathcal{C}) \to \mathcal{C}$ has a left adjoint. This is also what goblin mentioned in the comments. (This result should be well-known, but right now I have no reference for it.)
Unfortunately, $\mathsf{Top}$ is not cartesian closed. But the category of compactly generated weak Hausdorff spaces $\mathsf{CGWH}$ is cartesian closed and is (in contrast to $\mathsf{Top}$) a convenient category of topological spaces. It follows that $\mathsf{Grp}(\mathsf{CGWH}) \to \mathsf{CGWH}$ has a left adjoint. Also, $\mathsf{Grp}(\mathsf{CGWH})$ is complete and cocomplete.
