NRIs can claim exemption u/s 54, 54EC, 54F on long term capital gains. So, NRI can claim deduction from capital gains and claim refund.