File size: 528 Bytes
2fa7c8f
 
 
 
 
 
 
 
60a400f
2fa7c8f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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