You could use the following callback:
@app.callback(
Output("slider-vals", "value"),
[Input("interval", "n_intervals")],
[State("slider-vals", "value")]
)
def display_count_hidden(n, value):
value = value or 0
return (value + 1) % 24