File size: 325 Bytes
7c6ebf3
f1a0cb5
7c6ebf3
f1a0cb5
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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()