Is there something like justpy or iona-web in OCaml? These frameworks let you do GUI programming all in Python with underlying browser interface.
Maybe ocsigen eliom is what you’re asking for, take a look: Introduction