Spaces:
Sleeping
Sleeping
File size: 601 Bytes
e288e5a 7d95523 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
import os.path
def output(image_path):
output_path = 'output'
caption = 'person . mask'
flag = False
save_image_path = os.path.join(output_path,os.path.split(image_path)[-1])
return save_image_path
with gr.Blocks() as demo:
gr.Markdown("<h1><center>Demo</center></h1>")
img_obj = gr.Image(value ='image/test.jpg',type = "filepath",label='object_img')
btn = gr.Button("Submit",variant="primary")
img_output = gr.Image(type = "filepath",label='output_img')
btn.click(fn=output,inputs=[img_obj],
outputs=[img_output],
)
demo.launch() |