Is it as efficient as it can be? Of course not lol
But this was a really cool thing to learn, I wanted to create a UI from my custom .ps1 apps to expand the scope of users that would be able to use it and overall, I think it turned out to be a solid solution.
Integrating @streamlit & Powershell
I have been experimenting adding a Streamlit UI for my python apps, and it is awesome how quick you can spin up a neat UI without moving away from python (in most cases lol)
However: can I use Streamlit UI with .ps1?
A: Y
And that's basically it! Once you are able to pass the arguments correctly into PowerShell, it is just a matter of handling the value inside of the .ps1 script.
You can expand on this and pipe the output from the subprocess back into the main program to execute other tasks.