Spaces:
Sleeping
Sleeping
Commit
·
f1293be
1
Parent(s):
80d5a90
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,21 +2,14 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
iface = gr.Interface(
|
| 9 |
fn=greet,
|
| 10 |
-
inputs="
|
| 11 |
outputs="text",
|
| 12 |
-
title="Title"
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
gr.Markdown("## Text Examples")
|
| 16 |
-
gr.Examples(
|
| 17 |
-
["hi", "Adam"],
|
| 18 |
-
iface
|
| 19 |
-
)
|
| 20 |
|
| 21 |
if __name__ == "__main__":
|
| 22 |
-
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
+
|
| 6 |
+
iface = gr.Interface(
|
|
|
|
|
|
|
| 7 |
fn=greet,
|
| 8 |
+
inputs=gr.Textbox(lines=1, max_lines=10, label="Input Text"),
|
| 9 |
outputs="text",
|
| 10 |
+
title="Title",
|
| 11 |
+
examples=["hi", "Adam"]
|
| 12 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
if __name__ == "__main__":
|
| 15 |
+
iface.launch()
|