Chengyu commited on
Commit
eb5f1f7
1 Parent(s): c044eaa

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def greet(name):
4
+ return "Hello " + name + "!"
5
+
6
+ ## just used the Textbox class
7
+ demo = gr.Interface(
8
+ ## you can add title ; description: examples : inputs: outputs
9
+ title='This is a demo app',
10
+ description='Description of a test app',
11
+ fn=greet,
12
+ inputs=gr.Textbox(lines=4, ## now you can specify some params
13
+ placeholder="Name Here ...",
14
+ label="Your name"),
15
+ ## you can also do a list of various inputs
16
+ outputs="text",
17
+ examples=[['xxxyyy'],['1234']]
18
+ # css = ....
19
+ )
20
+
21
+ demo.launch(share=True)