import cv2
print(f"GradioLite > opencv-python=={cv2.__version__}")
import gradio as gr
def update(name):
return f"Welcome to GradioLite, {name}!"
with gr.Blocks() as demo:
gr.Markdown("# GradioLite Template")
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Textbox(placeholder="What is your name?")
out = gr.Textbox()
btn = gr.Button("Run")
btn.click(fn=update, inputs=inp, outputs=out)
gr.Image(sources=["upload", "webcam", "clipboard"], interactive=True, label="Test gr.Image")
demo.launch(pwa=True)