Instructions to use microsoft/OmniParser-v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/OmniParser-v2.0 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("microsoft/OmniParser-v2.0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Apply suggestions from @ThomasDh-C code review
Verified signature54dd913
-
Update handler.py
Verified signature1ebdf33 -
Add `handler.py` and `requirements.txt`
Verified signatureThis PR adds the `handler.py` and the `requirements.txt` files required to run Microsoft OmniParser v2 on Inference Endpoints and on Azure ML. This PR contains the code adapted from both the [Microsoft OmniParser v2 Gradio demo](https://huggingface.co/spaces/microsoft/OmniParser-v2) and the code shared by @ThomasDh-C on [his fork of OmniParser v2](https://huggingface.co/ThomasDh-C/OmniParser-v2.0). Any contributions are welcomed, and note that the code has been slightly modified as in organization and variable naming, but the code remains the same otherwise. Also note that the code can be modified at any point, so @ThomasDh-C feel free to jump in if you feel like changing anything. Thanks in advance 🤗acd5c25