In 6th and 7th semester you can apply for UPSC exam.You should have your degree in interview process.Otherwise you donu2019t need your degree for prelims & mains exam.