With a fixed pitch prop, one could get HP from the RPM but one would need to take in altitude and temperature.
With a CS prop, it can't be done that simply. The governor is holding the RPM constant (within certain limits) so RPM alone is useless. You can get a rough indication from the engine fuel flow and some other factors, and it gets more complicated because the only time the HP is proportional to fuel flow is when at peak EGT or LOP.