Even if your contract states they need to be professionally cleaned this would only stand up in court if (a) they could prove they had been professionally cleaned before you moved in and (b) they have photos (dated) proving the state of the carpets when you moved in and again when you moved out. The reason for this is to prevent cheeky landlords claiming filthy, half-mouldy rags were 'perfect' when you moved in, when in fact that's what they were like when you took over the tenancy.
You are not required to return the property in a better state than you received it! Nor are you expected to return the propety in the same state you received it, you are expected to return it in the same state you received it MINUS NORMAL WEAR AND TEAR. What this means in practice is that if you've been living there for many years and have cheap pale beige carpets in areas of heavy traffic, for example (typical of rental properties), that some aging of the carpet by the normal process of wear and tear would be acceptable. In fact, I recall reading that a percentage of what can be claimed by the landlord for replacement of carpets decreases in practice year by year - so if you've been living there for 10 years, even if the carpet is now black with ingrained dirt, the landlord couldn't claim a penny because reasonably they should have replaced the carpet by that time.
In our ex-rented house, our landlady tried it on with the carpet cleaning (we'd been there 6 years and she had no photos or proof at all of the state of the property either when we left or moved in, and no independent inventory done when we left (we'd agreed the inventory when we moved in)), so every single one of her claims was thrown out by the independent ombudsman, and our deposit returned in full.
Try not to stress, OP - clean the carpet as well as possible, and if you can hire/borrow a carpet cleaner and do it yourself, then great. Otherwise, just state you have cleaned it. Do take photos in case the landlord/agency attempt to claim you poured black ink over it or something! All of what I have said applies to other areas in the house too - professional cleaning cannot be demanded, whatever they say - you and family/friends scrubbing is acceptable (obviously not if you fail to clean, but 'professionally' clean is not required). Also, do take as many dated photos as possible - use camera with date facility or email photos to yourself when you check out etc - to prove that you have left the house in a good condition.
Sadly there are some criminal landlords out there who will do anything to get tenants' cash, including those who seem to have problems with the concept of wear and tear, and imagine a family of tenants can live in a house for years on end and yet it WILL LOOK IDENTICAL TO THE DAY THEY MOVED IN. Grr. Landlords to whom it is an affront that their tenants are anything other than human £ signs, occupying no physical space at all, but transferring money magically to their bank accounts on the same day every month.