Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,22 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""GRADIO: Hello World.ipynb
|
3 |
+
Automatically generated by Colaboratory.
|
4 |
+
Original file is located at
|
5 |
+
https://colab.research.google.com/drive/18ODkJvyxHutTN0P5APWyGFO_xwNcgHDZ
|
6 |
+
## Using Gradio to create a simple interface.
|
7 |
+
Check out the library on [github](https://github.com/gradio-app/gradio-UI) and see the [getting started](https://gradio.app/getting_started.html) page for more demos.
|
8 |
+
We'll start with a basic function that greets an input name.
|
9 |
+
"""
|
10 |
|
11 |
def greet(name):
|
12 |
+
return "Hello " + name + "!"
|
13 |
|
14 |
+
greet("World")
|
15 |
+
|
16 |
+
"""Now we'll wrap this function with a Gradio interface."""
|
17 |
+
|
18 |
+
import gradio
|
19 |
+
|
20 |
+
gradio.Interface(greet, "text", "text").launch()
|
21 |
+
|
22 |
+
"""That's all! Go ahead and open that share link in a new tab. Check out our [getting started](https://gradio.app/getting_started.html) page for more complicated demos."""
|