Why is this potentiometer and comparator circuit not working?
Looking at the Electrical Characteristics of the LM2901, I see that the common-mode input voltage range is 0 to Vcc-1.5 volts.  You have the negative inputs at 4 volts, or Vcc-1, which is outside the recommended operating range.  The comparators are not guaranteed to work correctly when the common mode voltage is within 1 volt of the positive supply.

Try changing R6 to 2K, and R7 to 3K, to bring the common-mode voltage within the legal range.