Instructions to use OtraBoi/document_classifier_testing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OtraBoi/document_classifier_testing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="OtraBoi/document_classifier_testing")# Load model directly from transformers import AutoProcessor, AutoModelForSequenceClassification processor = AutoProcessor.from_pretrained("OtraBoi/document_classifier_testing") model = AutoModelForSequenceClassification.from_pretrained("OtraBoi/document_classifier_testing") - Notebooks
- Google Colab
- Kaggle
| FROM python:3.9-slim-bullseye AS base | |
| WORKDIR /app | |
| FROM base AS build | |
| COPY ["requirements.txt", "./"] | |
| RUN \ | |
| apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| git \ | |
| g++ && \ | |
| rm -rf /var/lib/apt/lists/* && \ | |
| # Install dependencies. | |
| python -m venv ./venv && \ | |
| ./venv/bin/pip install --upgrade \ | |
| pip \ | |
| setuptools \ | |
| wheel && \ | |
| ./venv/bin/pip install --no-cache-dir -r ./requirements.txt && \ | |
| ./venv/bin/pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git@d1e04565d3bec8719335b88be9e9b961bf3ec464' | |
| FROM base AS final | |
| RUN \ | |
| apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| tesseract-ocr && \ | |
| rm -rf /var/lib/apt/lists/* | |
| COPY --from=build ["/app/venv", "./venv"] | |
| # Copy the source code in last to optimize rebuilding the image. | |
| COPY [".", "./"] |