import gradio as gr import subprocess import gradio as gr def greet(cmd): er,out = subprocess.getstatusoutput(cmd) return out demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch()