File size: 286 Bytes
66047a7
47494bd
66047a7
 
47494bd
 
2958d0e
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import gradio as gr
import subprocess

def greet(name):
    output =subprocess.run(['ls', '-l'], stdout=subprocess.PIPE).stdout.decode('utf-8')
    return name + output

demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")
    
if __name__ == "__main__":
    demo.launch()