kalpapathiraja commited on
Commit
1c12ec8
·
verified ·
1 Parent(s): c15182e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -14
app.py CHANGED
@@ -1,16 +1,14 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello, {}!".format(name)
5
-
6
- def welcome_message(greeting, mood):
7
- if mood == "Happy":
8
- return greeting + " Welcome!"
9
- else:
10
- return greeting + " Not welcome"
11
-
12
- iface1 = gr.Interface(greet, "text", "text", title="Step 1: Enter Your Name")
13
- iface2 = gr.Interface(welcome_message, ["text", gr.inputs.Radio(choices=["Happy", "Sad"])], "text", title="Step 2: Select Your Mood")
14
-
15
- iface1.launch(inline=False)
16
- iface2.launch()
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks() as demo:
4
+ with gr.Row():
5
+ with gr.Column(scale=1, min_width=600):
6
+ text1 = gr.Textbox(label="Input Text")
7
+ text2 = gr.Textbox(label="prompt",interactive=False)
8
+ with gr.Row():
9
+ happpy_button = gr.Button("Happy")
10
+ sad_button = gr.Button("Sad")
11
+ excited_button = gr.Button("Excited")
12
+ text5 = gr.Textbox(label="prompt After Tone",interactive=False)
13
+
14
+ demo.launch()