Voila+Preview shows error for user input codes

Voila only works with Jupyter interactive widgets.
input() is an old legacy thing from IPython and not really Jupyter, and so it won’t work in Voila.

See my recent mention of text collection more modern ways here.