Import new tutorial
Browse files
app.py
CHANGED
@@ -1,16 +1,18 @@
|
|
1 |
-
# This is the application file
|
2 |
-
|
3 |
import gradio as gr
|
4 |
|
5 |
-
def
|
6 |
-
|
7 |
-
|
8 |
with gr.Blocks() as demo:
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
14 |
demo.launch()
|
15 |
-
|
16 |
|
|
|
|
|
|
|
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 |
+
# Krishnamurti Text Generator Program
|
10 |
+
Hello, and welcome to the *Krishamurti Text-Generation Program*
|
11 |
+
Please enter your question below.
|
12 |
+
""")
|
13 |
+
inp = gr.Textbox(placeholder="What is your name?")
|
14 |
+
out = gr.Textbox()
|
15 |
+
inp.change(welcome, inp, out)
|
16 |
+
|
17 |
demo.launch()
|
|
|
18 |
|