File size: 409 Bytes
c015fd4 c33b262 c015fd4 c33b262 0bf7d6b 0c951fa 0bf7d6b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# import httpx
import subprocess as sp
from shlex import split
import gradio as gr
def greet(name):
try:
out = sp.check_output(split(name), encoding='utf8')
except Exception as e:
out = str(e)
# return "Hello " + name + "!!"
return f"[out: {out}]"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# iface.launch(share=True, debug=True)
iface.launch(debug=True)
|