Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

ddnovikov submission #7

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
More fixes.
405midnight committed May 14, 2023

Unverified

This user has not yet uploaded their public signing key.
commit 2da75e276febdf79d0be4f285e12dd2d71e98339
5 changes: 0 additions & 5 deletions solution/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,11 +2,6 @@

FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime

RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
git \
git-lfs

WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install -r /code/requirements.txt
3 changes: 1 addition & 2 deletions solution/app.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
from transformers import pipeline
from starlette.requests import Request


app = FastAPI()

models = {
@@ -16,7 +15,7 @@
}

for model_key, model_dict in models.items():
text_classification_pipeline = pipeline('text-classification', model=model_dict["name"], device=0)
text_classification_pipeline = pipeline('text-classification', model=model_dict["name"], device="cuda:0")
model_dict["pipeline"] = text_classification_pipeline