# upgrade python
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt update
sudo apt install -y libgl1
sudo apt install python3.12 -y
sudo apt install python3.12-venv -y
# link python to python3.12
sudo ln /usr/bin/python3.12 /usr/bin/python
# install pip
wget https://bootstrap.pypa.io/get-pip.py | python get-pip.py
# virtual venv
python -m venv venv
sourse venv/bin/activate
git clone https://github.com/microsoft/OmniParser.git
cd OmniParser
pip install -r requirements.txt
# download the model checkpoints to local directory OmniParser/weights/
for f in icon_detect/{train_args.yaml,model.pt,model.yaml} icon_caption/{config.json,generation_config.json,model.safetensors}; do huggingface-cli download microsoft/OmniParser-v2.0 "$f" --local-dir weights; done
mv weights/icon_caption weights/icon_caption_florence
# run demo
python gradio_demo.py
部署 Omniparse
声明:本站原创文章文字版权归本站所有,转载务必注明作者和出处;本站转载文章仅仅代表原作者观点,不代表本站立场,图文版权归原作者所有。如有侵权,请联系我们删除。