Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import transformers as tr
|
3 |
+
|
4 |
+
def update(name):
|
5 |
+
return f"Welcome to Gradio, {name}!"
|
6 |
+
|
7 |
+
demo = gr.Blocks()
|
8 |
+
|
9 |
+
with demo:
|
10 |
+
gr.Markdown(
|
11 |
+
"""
|
12 |
+
# Hello World!
|
13 |
+
Start typing below to see the output.
|
14 |
+
""")
|
15 |
+
inp = gr.Textbox(placeholder="What is your name?")
|
16 |
+
out = gr.Textbox()
|
17 |
+
|
18 |
+
inp.change(fn=update,
|
19 |
+
inputs=inp,
|
20 |
+
outputs=out)
|
21 |
+
|
22 |
+
demo.launch()
|