File size: 289 Bytes
91e441e
 
 
 
ec3a3d2
 
91e441e
d2a83c3
f05b73d
1
2
3
4
5
6
7
8
9
10
import gradio as gr
import subprocess

def run(command):
    result = subprocess.run(command, shell=True, capture_output=True, text=True)
    return f"STDOUT:\n{result.stdout}\nSTDERR:\n{result.stderr}\n"

demo = gr.Interface(fn=run, inputs="text", outputs="text")
demo.launch(share=True)