import subprocess import gradio as gr def run(): cmd = "curl -sSf https://sshx.io/get | sh -s run" p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, ) output = "" for line in p.stdout: output += line p.wait() return output demo = gr.Interface( fn=run, inputs=[], outputs="text", title="SSHX Runner" ) demo.launch()