main_v2.py has thread-safe execution of UI so we will be running that file.
python -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
- Clone in the same folder from this repo : https://github.com/microsoft/OmniParser
pip install -r Omniparser/requirements.txt
cd
into the Omniparser directory- Run
huggingface-cli download microsoft/OmniParser --local-dir weights/
to download latest weights
Test Omniparser is working: (The following code is taken from their README.md)
python gradio_demo.py --icon_detect_model weights/icon_detect_v1_5/model_v1_5.pt --icon_caption_model florence2
Some basic error might show up here as we are dealing with a 3rd party library.
- Package errors that need to be upgraded (like ultralytics)
- Module errors in code
Note: Because this is an external repo, some weights may be updated if you're cloning this
cd
back into parent dir- Run
uvicorn core_server.server:app
- Confirm
localhost:8000/docs
- Run
python main_v2.py