hong-xl
commited on
Commit
•
0987ddf
1
Parent(s):
bdf746e
update application file
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def greet(name):
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
# Create Gradio input and output components
|
7 |
image_input = gr.inputs.Image(type='filepath', label="Input Image")
|
@@ -13,5 +16,7 @@ dense_caption_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda',
|
|
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()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# def greet(name):
|
4 |
+
# return "Hello " + name + "!!"
|
5 |
+
|
6 |
+
def greet(img):
|
7 |
+
return img
|
8 |
|
9 |
# Create Gradio input and output components
|
10 |
image_input = gr.inputs.Image(type='filepath', label="Input Image")
|
|
|
16 |
semantic_segment_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cuda', label='Semantic Segment Device')
|
17 |
controlnet_device = gr.inputs.Radio(choices=['cuda', 'cpu'], default='cpu', label='ControlNet Device')
|
18 |
|
19 |
+
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
20 |
+
iface = gr.Interface(fn=greet, inputs=[image_input], outputs=gr.outputs.HTML())
|
21 |
+
|
22 |
iface.launch()
|