Under normal conditions on Earth, the plant would not need to know which way is up since the roots go down and the stems grow towards the sky, and all of it is maintained by the help of gravity. Without that force, things become unclear, though. This fact was illustrated in the experiments done by NASA astronauts who grew Hatch chile peppers on the International Space Station in 2021.
According to NASA’s official records on the mission, the Hatch chile peppers spent 137 days growing in orbit and produced a harvestable crop. Moreover, the stalks of the plants grew to be unusually straight, unlike those growing on Earth. While it seemed like just another space experiment, in fact, it was just a tiny part of a larger issue concerning whether astronauts would ever be able to grow something to eat during their long missions away from home. The answer was yes.