Hi JavierF,
you need to have all the function definitions that are necessary for your streamlit inside your app.py script.
(you can also define them outside the script, but in that case you need to import your module where the function is defined into the app.py)
Hope that works for you, have a great day