Of the 20, six people are seriously injured and have been referred to a hospital in Srinagar. The others are undergoing treatment at a local hospital, officials said.
The attack comes a day before a delegation of European Union MPs is visiting the Valley.
Security forces have cordoned off the area and launched an operation to nab the attackers.
No arrests have been made so far, police said.