I tried a 1n4001 diode with a 450 microfarad capacitor but its not working.
Well, without knowing any more detail about your LED strip, I would have gone with at least 10 times that capacity, if I had to guess.
If I do some very crude napkin math, and assume you have a 5 W @ 12 V LED strip. Then the current would be 0.4 A, so the load resistance the LED strip provides would be 29 Ohm. A 4500 µF cap and a 29 Ohm resistance have a time constant of 0.1 s (after that time the cap would be dischared to 37% assuming an ohmic load), so if we go for maybe a third of that we would be able to bridge a drop for about 0.04 s. I feel like that would be barely enough, so I guess you need at least 4500 µF for a 5 W @ 12 V LED strip. But then again I don't know how long your voltage dips out or how much power your LED strip has.
Or use a separate power supply like Steve suggested.
I hope you're not powering any logic from that 12 V power supply as well.