Investors & landlords

The answer is still not clear to me unfortunately. My question is as follows: I replaced the damaged carpet caused by the tenant's dog who moved out, and then I, as the owner, move back to live in this property. Can I deduct the cost of carpet replacement?