Show Console for question, then display an picture or static webpage

Hi, I want to update some code so they are easier to use with replit. For instance, I want to wrap a small map generator I made in C++. I start a shellscript to ask the user for their parameters, then instead of making them download the image in the files on the side, I want to open a webview to show it. Right now, the webview open and prevents the user to see the prompt, locking the process in a loading state…

Replit link: https://replit.com/@Spationaute/Mapgenerator

How can I do it?
Thanks

This should be in #code-help:c