taste is not a defining factor of wether a plant growth is a vegetable or a fruit. As an example, a tomato is a fruit as well.
Vegetables generally don't have seeds within the edible portion- Carrots, celery, tubers, lettuce, broccoli, etc. a fruit, on the other hand, generally grows after the flower has been pollinated and in some instances will provide food for the growing seeds.