Rohit:
Unless your visa status changed in 2004, the fact that you filed as a resident alien in 2003, IMHO, obligated you to file as a resident alien in 2004.
This being the case, your attempt to convert back to non-resident alien status by filing Form 1040X will likely not succeed. You lose nothing by trying, but I do not anticipate the IRS ruling in your favor.
Assuming you
can file as a non-resident alien in 2004 (not likely, but let's assume anyway), whether you can exempt all the income depends on
for whom you worked and the
nature of the work.
Download IRS Pub 901 from
www.irs.gov and read the sections pertaining to India for guidance.