my-python-app / app.py
Sundauau's picture
Update app.py
f2561ea verified
Raw History Blame Contribute Delete
462 Bytes
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()