import torch


def get_val(value):
    """
    Extract the integer value of the input (or keep it as a string it it's not an integer/tensor)
    
    :param value: an integer or tensor (with one integer element)
    """
    if type(value) is torch.Tensor:
        return int(value)
    else:
        return value