MPU6050 Gyro value going back to initial value irrespective of Angle

The Gyros when directly read will give values near zero.

I calculate the Gyro rotation by using AxRaw, AyRaw, and AzRaw.

The formula I use for gyro rotation is written in Python, I have my MPU-6050 on a Raspberry Pi but here is the Python code I use to figure out current Gyro Angles:

fGet_x_rotation(AxRaw, AyRaw, AzRaw) + X_Rotation_Offset)
         fGet_y_rotation(AxRaw, AyRaw, AzRaw) + Y_Rotation_Offset))


def fDist(a,b):
    return math.sqrt((a*a)+(b*b));
 

def fGet_y_rotation(x,y,z):
    radians = math.atan2(y, fDist(x,z))
    return math.degrees(radians);

def fGet_x_rotation(x,y,z):
    radians = math.atan2(x, fDist(y,z))
    return -math.degrees(radians);

I'm sure the code will convert over to Arduino C or you can find the equivalent already written for the Arduino, but you'll know what you are looking form