Timeline with integer/float x axis not working

I saw an example in this forum on how to use the figure factory to produce a gantt chart for integer or float values. Since there are now deprecated and replaced by px.timeline I tried porting the example but it does not work.

Here is some code showing both methods.

Am I missing anything here?

import plotly.figure_factory as ff
import plotly.express as px

df = [dict(Task="Job A", Start=1, Finish=5.5),
      dict(Task="Job B", Start=2, Finish=3),

fig = ff.create_gantt(df)

#Does not work
fig2 = px.timeline(data_frame=df,x_start='Start', x_end='Finish', y='Task')