A dwarf gourami needs a 10-gallon tank or bigger. As a rule, one inch of fish requires at least a gallon of water to live comfortably, and a dwarf gourami usually grows to be around 3.5 inches long when mature. Thus, you can only fit a pair of dwarf gouramis inside a 10-gallon tank.
As social creatures, dwarf gouramis thrive best in large groups of at least four fish. Therefore, you should have a 20-gallon tank or bigger to keep your gouramis happy.