Gratuity is payable only if you are on the payroll of the company. If you are a freelancer, you are not an employed individual. As such, you would not be liable to receive gratuity.