when I run my air-conditioning it blows cold than starts blowing hot air on 2007 Jeep Patriot

I have a digital temperature gauge and it will start rising rapidly sometimes up to 130 degrees when I try to run my A/C it will only blow cold for a few minutes than start blowing hot air. I had the A/C unit replaced under warranty but it still does the same thing