example / app.py
masao1211's picture
.
5c13302
raw
history blame
307 Bytes
import gradio as gr
import subprocess
def greet(name):
process = subprocess.run(["ls"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = process.stdout.decode("utf-8")
return "Hello " + name + "!!" + output
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()