TypeError: model_fn() takes 1 positional argument but 2 were given

This code is executed for inference. You can see lines 277 to 281 where they have defined functions load_fn, predict_fn etc. These functions are like user defined proxies to load, predict and other huggingface functions. Just one constraint that these user proxy functions should take the arguments passed by respective huggingface defined functions.