Spaces:
Build error
Build error
Download command.py from Erixson/AUTOMATIC1111-stable-diffusion-webui: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/spaces/Erixson/AUTOMATIC1111-stable-diffusion-webui/resolve/main/command.py
- Command line
-
hf download hf://spaces/Erixson/AUTOMATIC1111-stable-diffusion-webui/command.py
-
curl -L -o command.py https://huggingface.co/spaces/Erixson/AUTOMATIC1111-stable-diffusion-webui/resolve/main/command.py
379 Bytes
| import gradio as gr | |
| from subprocess import getoutput | |
| def run(command): | |
| out = getoutput(f"{command}") | |
| return out | |
| with gr.Blocks() as app: | |
| command = gr.Textbox(show_label=False, max_lines=1, placeholder="command") | |
| out_text = gr.Textbox(show_label=False) | |
| btn_run = gr.Button("run command") | |
| btn_run.click(run, inputs=command, outputs=out_text) | |
| app.launch() |