File size: 590 Bytes
c809b58
 
 
 
 
 
b261731
c809b58
b261731
 
c809b58
 
1
2
3
4
5
6
7
8
9
10
11
12
FROM python:3.9
WORKDIR /code
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .

# Automatically download your massive model bypassing the 1GB limit!
RUN pip install huggingface-hub
RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='TuTGo/toxic-model', filename='toxic_xlmr.tflite', local_dir='.')"
RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='TuTGo/toxic-model', filename='sentencepiece.bpe.model', local_dir='.')"

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]