Buy the G5, you'll outgrown the G4 way too fast.
If you want to keep the machine around and you already have a computer and the monitor, consider the current Single Processor 1.8GHz PowerMac G5 -- it's basically a headless-iMac in a PowerMac case.
However, with the new iMac G5 design -- it's easier to upgrade quite a bit of the stuff that was a PIA in the iMac G4 -- HD, optical drive, memory, etc. (though the CPU and the video chip are still soldered in and not upgradeable on the new iMac.)
Of course the SP 1.8 PM has an AGP slot, 2 extra dimm slots, drive bays and PCI slot -- at the expense of the LCD display. But it is a decent trade-off for some.