How do seeds sprout?

when a seed germinates, it pushes a shoot up,so it goes above ground, and a root down into the soil. But how does the seed know which direction is up and which is down?

Could gravity have anything to do with it?

Have astronaughts tried growing seeds in zero gravity? With what result?

Seems simple, but it’s true…it’s mostly gravity and light.

Growing peas in microgravity.
Almost time to harvest.