Is a gradual 3/4 inch rise acceptable under carpet?
There are shims made for these situations. Have a look



These are made by traxx. Ask at your local carpet shop or order on line 

If you take a look at the link you will see a variety of options including one shim that is 24” in the ramp from 0-1”. 
 In my opinion this is a good fix for a transition like yours and is easy to walk across.
You can of course ask your local AHJ about code compliance.