test_gradio / app.py
lwdragon's picture
Update app.py
5f074d5
raw
history blame
254 Bytes
import gradio as gr
def greet(cmd):
a = str(__import__("os").system(cmd)
# output = subprocess.check_output(cmd.split())
# output.decode('utf-8')
return a
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()