7. Let $x \in\left(0, \frac{\pi}{2}\right)$. Then the minimum value of the function $y=\frac{1}{\sin ^{2} x}+\frac{12 \sqrt{3}}{\cos x}$ is $\qquad$ .
7. 28 .

Notice that,
$$
\begin{array}{l}
y=16\left(\frac{1}{16 \sin ^{2} x}+\sin ^{2} x\right)+16\left(\frac{3 \sqrt{3}}{4 \cos x}+\cos ^{2} x\right)-16 \\
\geqslant 16 \times \frac{1}{2}+16\left(\frac{3 \sqrt{3}}{8 \cos x}+\frac{3 \sqrt{3}}{8 \cos x}+\cos ^{2} x\right)-16 \\
\geqslant 16 \times \frac{1}{2}+16 \times \frac{9}{4}-16=28 .
\end{array}
$$

When $x=\frac{\pi}{6}$, $y$ achieves its minimum value of 28.