How well is the fuel flowing from the petcock? Constant stream or light trickle? Does the float operate smoothly? Do you notice any difference if you take off the gas cap and try it then?
Sudden shutoff, plus runs briefly after sitting, does sound like a fuel delivery issue. But could also be electrical.
Does it have contact points ignition or a CDI? If points, test the condenser.