File size: 1,097 Bytes
61bbe53
 
 
 
24d750d
61bbe53
 
babfe4f
 
 
 
 
 
 
61bbe53
 
 
 
 
11a775c
 
babfe4f
 
61bbe53
071d680
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr


from sam2edit import create_demo as create_demo_edit_anything
# from sam2image import create_demo as create_demo_generate_anything


DESCRIPTION = f'''# [Edit Anything](https://github.com/sail-sg/EditAnything)
**Edit anything and keep the layout by segmenting anything in the image.**
'''
SHARED_UI_WARNING = f'''### [NOTE]  Inference may be slow in this shared UI.
You can duplicate and use it with a paid private GPU.
<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/jyseo/3DFuse?duplicate=true"><img style="margin-top:0;margin-bottom:0" src="https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-xl-dark.svg" alt="Duplicate Space"></a>
'''
with gr.Blocks() as demo:
    gr.Markdown(DESCRIPTION)
    with gr.Tabs():
        with gr.TabItem('Edit Anything'):
            create_demo_edit_anything()
        # with gr.TabItem('Generate Anything'):
        #     create_demo_generate_anything()
with gr.Box():
            gr.Markdown(SHARED_UI_WARNING)

demo.queue(api_open=False).launch()