Instructions to use AbdulElahGwaith/transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbdulElahGwaith/transformers with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbdulElahGwaith/transformers", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download docker/transformers-doc-builder/Dockerfile from AbdulElahGwaith/transformers: direct link, hf CLI and curl.
- Browser
- Download file 936 Bytes
-
https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docker/transformers-doc-builder/Dockerfile
- Command line
-
hf download hf://AbdulElahGwaith/transformers/docker/transformers-doc-builder/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docker/transformers-doc-builder/Dockerfile
936 Bytes
| FROM python:3.10 | |
| LABEL maintainer="Hugging Face" | |
| RUN apt update | |
| RUN git clone https://github.com/huggingface/transformers | |
| RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder ./transformers[dev] | |
| RUN apt-get -y update && apt-get install -y libsndfile1-dev && apt install -y tesseract-ocr | |
| # Torch needs to be installed before deepspeed | |
| RUN python3 -m pip install --no-cache-dir ./transformers[deepspeed] | |
| RUN python3 -m pip install --no-cache-dir --no-build-isolation torchvision git+https://github.com/facebookresearch/detectron2.git pytesseract | |
| RUN python3 -m pip install -U "itsdangerous<2.1.0" | |
| # Test if the image could successfully build the doc. before publishing the image | |
| RUN doc-builder build transformers transformers/docs/source/en --build_dir doc-build-dev --notebook_dir notebooks/transformers_doc --clean | |
| RUN rm -rf doc-build-dev |