Spaces:
Sleeping
Sleeping
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() |