|
import os |
|
|
|
if __name__ == '__main__': |
|
|
|
os.system("pip install -e .") |
|
|
|
|
|
os.system("curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash") |
|
|
|
|
|
os.system("source ~/.bashrc") |
|
|
|
|
|
os.system("nvm install v18.16.0") |
|
|
|
|
|
os.system("curl -fsSL https://get.pnpm.io/install.sh | sh -") |
|
|
|
|
|
os.system("source ~/.bashrc") |
|
|
|
|
|
os.system("pnpm --version") |
|
|
|
|
|
os.system("git clone https://github.com/chencn2020/gradio-bbox.git") |
|
|
|
|
|
os.system("cd gradio-bbox") |
|
|
|
|
|
os.system("bash scripts/build_frontend.sh") |
|
|
|
|
|
os.system("cd ..") |
|
|
|
|
|
os.system("pip install -e .") |
|
|
|
|
|
os.system("pip install git+https://github.com/facebookresearch/segment-anything.git") |
|
|
|
|
|
os.system("curl -o ./checkpoints/sam_vit_b_01ec64.pth https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth") |
|
|
|
import argparse |
|
from demo.UI import Main_ui |
|
|
|
parser = argparse.ArgumentParser(description='SEAGULL', formatter_class=argparse.RawTextHelpFormatter) |
|
parser.add_argument('--model', help='path to seagull model', default='Zevin2023/SEAGULL-7B') |
|
parser.add_argument('--example_path', help='path to examples', default='./imgs/Examples') |
|
args = parser.parse_args() |
|
|
|
demo = Main_ui(args).load_demo() |
|
demo.launch() |