Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,19 +7,10 @@ def greet(name):
|
|
| 7 |
return "Hello " + name + "!!"
|
| 8 |
|
| 9 |
with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
fn=greet,
|
| 15 |
-
inputs=name_input,
|
| 16 |
-
outputs=greet_output,
|
| 17 |
-
title="Greeting App",
|
| 18 |
-
description="This app greets you by name.",
|
| 19 |
-
theme=gradio.Themes.LIGHT,
|
| 20 |
-
layout="vertical",
|
| 21 |
-
analytics_enabled=False
|
| 22 |
-
)
|
| 23 |
|
| 24 |
demo = gr.Interface(
|
| 25 |
fn=greet,
|
|
|
|
| 7 |
return "Hello " + name + "!!"
|
| 8 |
|
| 9 |
with gr.Blocks(theme=gr.themes.Glass()) as demo:
|
| 10 |
+
name = gr.Textbox(label="Name")
|
| 11 |
+
output = gr.Textbox(label="Output Box")
|
| 12 |
+
greet_btn = gr.Button("Greet")
|
| 13 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
demo = gr.Interface(
|
| 16 |
fn=greet,
|