A rental property needs to be kept in good condition for the tenants. It is their home and they should be able to feel they can enjoy living there. If the carpets need replacing, this is something that should be done as a matter of urgency – carpets in bad condition can really ruin a property.
You could consider replacing the carpets with a different type of flooring, like laminates. Many laminates are made to look like wood, stone or tiles, and they are incredibly good quality. This could help to make the flooring more long term, as it will be less prone to staining. It will be easier for tenants to keep clean as well, so many improve the longevity of your property.
If you do go with carpet, choose an option that is low cost but not cheap. It should be durable and last for years, otherwise, it is not a good investment.