Cacau commited on
Commit
00d5eee
·
1 Parent(s): 9e97f04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -7
app.py CHANGED
@@ -6,10 +6,25 @@ from PIL import Image
6
  def greet(name):
7
  return "Hello " + name + "!!"
8
 
9
- with gr.blocks(theme=gradio.Themes.SIMPLE_ORANGE) as demo:
10
- text_input = gr.inputs.Textbox(lines=2, placeholder="Name Here...")
11
- output_text = gr.outputs.Textbox()
12
- gr.Interface(fn=greet, inputs=text_input, outputs=output_text).\
13
- label("Greeting App").\
14
- caption("Type your name to receive a personalized greeting.").\
15
- launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  def greet(name):
7
  return "Hello " + name + "!!"
8
 
9
+ with gr.Blocks(theme=gr.themes.Glass()) as demo:
10
+ name_input = gr.inputs.Textbox(lines=2, placeholder="Name Here...", label="Enter Your Name")
11
+ greet_output = gr.outputs.Textbox(label="Greeting")
12
+
13
+ greet_interface = gr.Interface(
14
+ fn=greet,
15
+ inputs=name_input,
16
+ outputs=greet_output,
17
+ title="Greeting App",
18
+ description="This app greets you by name.",
19
+ theme=gradio.Themes.LIGHT,
20
+ layout="vertical",
21
+ analytics_enabled=False
22
+ )
23
+
24
+ demo = gr.Interface(
25
+ fn=greet,
26
+ inputs=gr.Textbox(lines=2, placeholder="Name Here..."),
27
+ outputs="text",
28
+ )
29
+
30
+ demo.launch()