It could be a little awkward for the buyers if you ask their intentions directly. The buyers may feel put on the spot, especially if they are going to buy the property to live in it. Once you found out the property was for sale, you probably stated your desire to stay and in turn, the agent likely stated in the listing that you'd like to continue to lease the property should the buyer be an investor.
Whether the buyer is an investor or owner occupant, the new owner must honor the remainder of your lease. Ask your landlord or agent if the buyers wish to continue to rent to you. If not, start looking for another place.