Spaces:
Runtime error
Runtime error
Change demo
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ from diffusers import StableDiffusionInpaintPipeline
|
|
38 |
|
39 |
from huggingface_hub import hf_hub_download
|
40 |
|
41 |
-
if not os.path.exists('./
|
42 |
-
os.system("wget https://github.com/IDEA-Research/Grounded-Segment-Anything/raw/main/assets/
|
43 |
|
44 |
if not os.path.exists('./sam_vit_h_4b8939.pth'):
|
45 |
logger.info(f"get sam_vit_h_4b8939.pth...")
|
@@ -457,7 +457,7 @@ if __name__ == "__main__":
|
|
457 |
with gr.Row():
|
458 |
with gr.Column():
|
459 |
input_image = gr.Image(
|
460 |
-
source="upload", elem_id="image_upload", type="pil", tool="sketch", value="
|
461 |
task_type = gr.Radio(["segment", "inpainting", "remove"], value="segment",
|
462 |
label='Task type', visible=True)
|
463 |
|
|
|
38 |
|
39 |
from huggingface_hub import hf_hub_download
|
40 |
|
41 |
+
if not os.path.exists('./inpaint_demo.jpg'):
|
42 |
+
os.system("wget https://github.com/IDEA-Research/Grounded-Segment-Anything/raw/main/assets/inpaint_demo.jpg")
|
43 |
|
44 |
if not os.path.exists('./sam_vit_h_4b8939.pth'):
|
45 |
logger.info(f"get sam_vit_h_4b8939.pth...")
|
|
|
457 |
with gr.Row():
|
458 |
with gr.Column():
|
459 |
input_image = gr.Image(
|
460 |
+
source="upload", elem_id="image_upload", type="pil", tool="sketch", value="inpaint_demo.jpg", label="Upload")
|
461 |
task_type = gr.Radio(["segment", "inpainting", "remove"], value="segment",
|
462 |
label='Task type', visible=True)
|
463 |
|