For $f(x) = x^4 + |x|$, let $I_1 = \int_0^\pi f(\cos x)\, dx$ and $I_2 = \int_0^{\frac{\pi}{2}} f(\sin x)\, dx$. Find the value of $\frac{I_1}{I_2}$.

Let's think step by step and output the final answer within \boxed{}.
user