ttw / app.py
freemt
Update
0bf7d6b
raw
history blame
409 Bytes
# 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)