Spaces:
Sleeping
Sleeping
| 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() |