In this demo, the model and data are dummy figures, so it crashes there.
It seems that the function call itself is being performed normally.
It may depend on the version of Gradio. For now, I recommend 4.44.0 or below. If it becomes more stable, 5 should be fine.