Ronak Ramachandran
commited on
Commit
•
5e527c3
1
Parent(s):
c1076fc
hello world only (simpler for now)
Browse files
app.py
CHANGED
@@ -1,32 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
demo = gr.Interface(
|
9 |
-
sentence_builder,
|
10 |
-
[
|
11 |
-
gr.Slider(2, 20, value=4, label="Count", info="Choose between 2 and 20"),
|
12 |
-
gr.Dropdown(
|
13 |
-
["cat", "dog", "bird"], label="Animal", info="Will add more animals later!"
|
14 |
-
),
|
15 |
-
gr.CheckboxGroup(["USA", "Japan", "Pakistan"], label="Countries", info="Where are they from?"),
|
16 |
-
gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"),
|
17 |
-
gr.Dropdown(
|
18 |
-
["ran", "swam", "ate", "slept"], value=["swam", "slept"], multiselect=True, label="Activity", info="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor, nisl eget ultricies aliquam, nunc nisl aliquet nunc, eget aliquam nisl nunc vel nisl."
|
19 |
-
),
|
20 |
-
gr.Checkbox(label="Morning", info="Did they do it in the morning?"),
|
21 |
-
],
|
22 |
-
"text",
|
23 |
-
examples=[
|
24 |
-
[2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
|
25 |
-
[4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
|
26 |
-
[10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
|
27 |
-
[8, "cat", ["Pakistan"], "zoo", ["ate"], True],
|
28 |
-
]
|
29 |
-
)
|
30 |
-
|
31 |
if __name__ == "__main__":
|
32 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def greet(name):
|
4 |
+
return "Hello " + name + "!"
|
5 |
|
6 |
+
demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")
|
7 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if __name__ == "__main__":
|
9 |
+
demo.launch()
|