Spaces:
Sleeping
Sleeping
Enhance video upload handling and error messaging. Updated Dockerfile to use gthread for improved performance with large uploads. Added progress tracking for video uploads in the frontend, with error handling for insufficient credits and file size limits. Improved error messages for failed segments and added a user-friendly upload progress indicator in the UI.
bc162b4 Download Dockerfile from userIdc2024/VideoTranslate: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/spaces/userIdc2024/VideoTranslate/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/userIdc2024/VideoTranslate/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/userIdc2024/VideoTranslate/resolve/main/Dockerfile
724 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| WORKDIR /app | |
| # ffmpeg/ffprobe are required by the translation pipeline. | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY . . | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Hugging Face Spaces expects the app to listen on 0.0.0.0:$PORT. | |
| # gthread: long uploads must not block health/poll requests. timeout 0: a 1GB | |
| # POST can take longer than gunicorn's default 30s silent-worker kill. | |
| CMD ["sh", "-c", "gunicorn -w 1 -k gthread --threads 8 --timeout 0 -b 0.0.0.0:${PORT} app.main:app"] | |