xinchen9 commited on
Commit
d1adaa8
1 Parent(s): 222d7ce

[Update]Add file

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -1,7 +1,20 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  demo.launch()
 
1
  import gradio as gr
2
 
3
+ with gr.Blocks() as demo:
4
+ with gr.Row():
5
+ text1 = gr.Textbox(label="t1")
6
+ slider2 = gr.Textbox(label="s2")
7
+ drop3 = gr.Dropdown(["a", "b", "c"], label="d3")
8
+ with gr.Row():
9
+ with gr.Column(scale=1, min_width=600):
10
+ text1 = gr.Textbox(label="Attacking Prompt")
11
+ inbtw = gr.Button("Add")
12
+ text4 = gr.Textbox(label="prompt 1")
13
+ text5 = gr.Textbox(label="prompt 2")
14
+ with gr.Row():
15
+ with gr.Column(scale=1, min_width=300):
16
+ img1 = gr.Image("images/cheetah.jpg",label="Image")
17
+ with gr.Column(scale=1, min_width=300):
18
+ img2 = gr.Image("images/cheetah.jpg",label="After Defense")
19
 
 
20
  demo.launch()