In a heavy-bottomed pan, combine the grated carrots and milk. Bring to a gentle boil, then reduce the heat and simmer, stirring occasionally, until the carrots are soft and most of the milk has evaporated (about 15 minutes).
Stir in the ghee and continue cooking, tossing the mixture so it does not stick, until it turns glossy (about 5 minutes).
Add the sugar and ground cardamom, mix thoroughly, and cook over medium heat, stirring constantly, until the sugar dissolves and the mixture thickens, and you begin to see ghee separating at the edges of the pan (another 10 minutes).
Remove from heat and transfer to a serving dish. Garnish with the chopped pistachios and almonds.
Serve hot or chilled.