test
Browse files
app.py
CHANGED
|
@@ -1,8 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
return "
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def welcome(name):
|
| 4 |
+
return f"Welcome to Gradio, {name}!"
|
| 5 |
|
| 6 |
+
with gr.Blocks() as demo:
|
| 7 |
+
gr.Markdown(
|
| 8 |
+
"""
|
| 9 |
+
# Hello World!
|
| 10 |
+
Start typing below to see the output.
|
| 11 |
+
""")
|
| 12 |
+
inp = gr.Textbox(placeholder="What is your name?")
|
| 13 |
+
out = gr.Textbox()
|
| 14 |
+
inp.change(welcome, inp, out)
|
| 15 |
|
| 16 |
+
demo.launch()
|