Prime Minister Narendra Modi has called off his visit to the UK next month for an in-person visit to Britain to attend the G-7 summit.