import gradio as gr | |
import os | |
import subprocess | |
subprocess.run(["pyload", "--help"], capture_output=True) | |
def greet(name): | |
return "Hello " + name + "!!" | |
with gr.Blocks() as demo: | |
with gr.Row(): | |
with gr.Column(): | |
input_text = gr.Textbox(label="Input") | |
submit_btn = gr.Button() | |
with gr.Column(): | |
output_text = gr.Textbox(label="Output") | |
submit_btn.click(fn=greet, inputs=[input_text], outputs=[output_text]) | |
demo.launch(share=True, ssr_mode=False) | |