import gradio as gr | |
class Gradio_Test: | |
def __init__(self): | |
pass | |
def title(self): | |
return "# An title .. (testing deployment) v0.1 " | |
def create_demo(self): | |
title = self.title() | |
with gr.Blocks() as demo: | |
gr.Markdown(title) | |
inp = gr.Textbox(placeholder="What is your name?") | |
out = gr.Textbox() | |
inp.change(fn=lambda x: f"Welcome .... , {x}!", | |
inputs=inp, | |
outputs=out) | |
return demo |