lhj commited on
Commit
f17b6d6
·
1 Parent(s): ef1a690
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -1,7 +1,19 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def welcome(name):
4
+ return f"Welcome to GmasterAI, {name}!"
5
 
6
+ with gr.Blocks() as demo:
7
+ gr.Markdown(
8
+ """
9
+ # Welcome to experience GmasterAI !
10
+ ### an exquisite AI drawing application.
11
+ New users will receive 10 free trial opportunities upon registration.
12
+ ### Website: <a href="https://www.gmaster.ai">https://www.gmaster.ai</a>
13
+ <a title="GmasterAI, CC BY-SA 4.0 &lt;https://creativecommons.org/licenses/by-sa/4.0&gt;, via Wikimedia Commons" href="https://www.gmaster.ai/"><img width="512" alt="Gmaster.ai" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Gmaster.ai.jpg/512px-Gmaster.ai.jpg"></a>
14
+ """)
15
+ inp = gr.Textbox(placeholder="What is your name?")
16
+ out = None
17
+ inp.change(welcome, inp, out)
18
+
19
+ demo.launch()