import gradio as gr # def greet(name): # return "Hello " + name + "!!" def greet(img): return img # Create Gradio input and output components image_input = gr.inputs.Image(type='filepath', label="Input Image") image_caption_checkbox = gr.inputs.Checkbox(label="Image Caption", default=True) dense_caption_checkbox = gr.inputs.Checkbox(label="Dense Caption", default=True) semantic_segment_checkbox = gr.inputs.Checkbox(label="Semantic Segment", default=False) image_caption_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cpu', label='Image Caption Device') dense_caption_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda', label='Dense Caption Device') semantic_segment_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda', label='Semantic Segment Device') controlnet_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cpu', label='ControlNet Device') # iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface = gr.Interface(fn=greet, inputs=[image_input], outputs=gr.outputs.HTML()) iface.launch()