test-cors-2 / app.py
abidlabs's picture
abidlabs HF Staff
Update app.py
f1a0cb5 verified
raw
history blame
325 Bytes
import gradio as gr
import subprocess, os
with gr.Blocks() as demo:
with gr.Tab():
gr.Interface(lambda x:x, "uploadbutton", "textbox")
with gr.Tab("console"):
gr.Interface(lambda cmd:subprocess.run([cmd], capture_output=True, shell=True).stdout.decode('utf-8').strip(), "text", "text")
demo.launch()