EditAnything / app.py
shgao's picture
update
68298fd
raw
history blame
1.07 kB
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)
gr.Markdown(SHARED_UI_WARNING)
with gr.Tabs():
with gr.TabItem('Edit Anything'):
create_demo_edit_anything()
# with gr.TabItem('Generate Anything'):
# create_demo_generate_anything()
demo.queue(api_open=False).launch()