def format_duration(dur: float) -> str:
    """Formats duration (from minutes) into a readable format"""
    if float(dur) >= 1.0:
        return "{} min".format(int(dur))
    else:
        return "{} sec".format(int(round(dur * 60)))