Instructions to use tiya1012/vit-accident-image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiya1012/vit-accident-image with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="tiya1012/vit-accident-image") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("tiya1012/vit-accident-image") model = AutoModelForImageClassification.from_pretrained("tiya1012/vit-accident-image", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download app.py from tiya1012/vit-accident-image: direct link, hf CLI and curl.
- Browser
- Download file 77 Bytes
-
https://huggingface.co/tiya1012/vit-accident-image/resolve/main/app.py
- Command line
-
hf download hf://tiya1012/vit-accident-image/app.py
-
curl -L -o app.py https://huggingface.co/tiya1012/vit-accident-image/resolve/main/app.py
77 Bytes
| import gradio as gr | |
| gr.load("models/tiya1012/vit-accident-image").launch() |