This is the advanced gradio used in our paper, GPT4RoI: Instruction Tuning Large Language Model on Region-of-Interest. This is an extension to official gradio, which supports drawing boxes on top of an image. This feature is requested in gradio-app/gradio#2316.
See mini-demo:
python app_box.py
We install it on Ubuntu with:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc # or ~/.zshrc based on which one you use
nvm install v18.16.0
curl -fsSL https://get.pnpm.io/install.sh | sh -
source ~/.bashrc # or ~/.zshrc based on which one you use
pnpm --version # check if success
git clone https://github.com/ShoufaChen/gradio-dev.git
cd gradio-dev
bash scripts/build_frontend.sh
pip install -e .
ERR_PNPM_FETCH_404 GET https://packagecloud.io/github/git-lfs/npm/whatwg-url/-/whatwg-url-5.0.0.tgz: Not Found - 404 No authorization header was set for the request.
pnpm/pnpm#2933 (comment)
# Add following in `~/.npmrc` file
@OWNER:registry=https://packagecloud.io/github/git-lfs/npm/
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode:
Use pip version >= 23.0.1
Our implementation is mainly inspired by gradio-app/gradio#3220, with several modifications for latest gradio. Greate thanks to CtrlAltDeplete.