hong-xl commited on
Commit
bdf746e
1 Parent(s): 9c27f4d

Add application file

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -3,5 +3,15 @@ import gradio as gr
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
 
 
 
 
 
 
 
 
 
 
6
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
+ # Create Gradio input and output components
7
+ image_input = gr.inputs.Image(type='filepath', label="Input Image")
8
+ image_caption_checkbox = gr.inputs.Checkbox(label="Image Caption", default=True)
9
+ dense_caption_checkbox = gr.inputs.Checkbox(label="Dense Caption", default=True)
10
+ semantic_segment_checkbox = gr.inputs.Checkbox(label="Semantic Segment", default=False)
11
+ image_caption_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cpu', label='Image Caption Device')
12
+ dense_caption_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda', label='Dense Caption Device')
13
+ semantic_segment_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda', label='Semantic Segment Device')
14
+ controlnet_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cpu', label='ControlNet Device')
15
+
16
  iface = gr.Interface(fn=greet, inputs="text", outputs="text")
17
  iface.launch()