Spaces:
Runtime error
Runtime error
Download Dockerfile from TuTGo/toxicity-api: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/spaces/TuTGo/toxicity-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/TuTGo/toxicity-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/TuTGo/toxicity-api/resolve/main/Dockerfile
590 Bytes
| 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"] |