A machine for making liquid or semi-liquid food products includes a plurality of first containers containing a liquid or semi-liquid basic mixture and having a deformable wall, such that the space occupied by each first container depends on a quantity of basic mixture in the first container. A rigid second container forming a processing chamber for the basic mixture includes a mixer and mechanism for thermal treatment to convert the basic mixture into a liquid or semi-liquid product. A sensor providing a signal representing the quantity of basic mixture at least in one of the first containers is operatively connected to the second container. A command and control unit is connected to the sensor to receive the signal and configured to infer, based on the signal, a condition of absence of mixture in one of the first containers connected to the second container.