Upload 17 files
Browse files- .dockerignore +8 -0
- Dockerfile +16 -0
- README.md +6 -10
- requirements.txt +1 -17
.dockerignore
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.pyc
|
| 3 |
+
*.pyo
|
| 4 |
+
*.pyd
|
| 5 |
+
*.swp
|
| 6 |
+
*.tmp
|
| 7 |
+
results/
|
| 8 |
+
chroma_db/
|
Dockerfile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Dependencias del sistema necesarias para vídeo/ocr (ajusta si no las usas)
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
ffmpeg libsm6 libxext6 libgl1 tesseract-ocr \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
COPY requirements.txt /app/
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
+
COPY . /app
|
| 13 |
+
|
| 14 |
+
# HF Spaces expone PORT
|
| 15 |
+
ENV PORT=7860
|
| 16 |
+
CMD ["uvicorn", "main_api:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|
README.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
| 1 |
-
# ============================
|
| 2 |
-
# README (para Hugging Face Space, FastAPI)
|
| 3 |
-
# ============================
|
| 4 |
-
"""
|
| 5 |
---
|
| 6 |
-
title: Veureu Engine (
|
| 7 |
emoji: 🎧
|
| 8 |
colorFrom: gray
|
| 9 |
colorTo: blue
|
|
@@ -12,11 +8,11 @@ app_file: main_api.py
|
|
| 12 |
pinned: false
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# Veureu Engine API
|
| 16 |
|
| 17 |
Endpoints:
|
| 18 |
-
- `POST /process_video`
|
| 19 |
-
- `POST /load_casting`
|
| 20 |
-
- `POST /refine_narration`
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Veureu Engine (Docker)
|
| 3 |
emoji: 🎧
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: blue
|
|
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Veureu Engine API (FastAPI via Docker)
|
| 12 |
|
| 13 |
Endpoints:
|
| 14 |
+
- `POST /process_video`
|
| 15 |
+
- `POST /load_casting`
|
| 16 |
+
- `POST /refine_narration`
|
| 17 |
|
| 18 |
+
El contenedor expone FastAPI en `${PORT:-7860}`.
|
requirements.txt
CHANGED
|
@@ -1,40 +1,24 @@
|
|
| 1 |
-
# API
|
| 2 |
fastapi==0.114.2
|
| 3 |
uvicorn[standard]==0.30.6
|
| 4 |
python-multipart==0.0.9
|
| 5 |
-
pydantic>=2.7,<3
|
| 6 |
PyYAML>=6.0
|
| 7 |
requests>=2.32
|
| 8 |
-
gradio_client>=0.16.0
|
| 9 |
|
| 10 |
-
# Core utils
|
| 11 |
numpy>=1.26
|
| 12 |
Pillow>=10.4
|
| 13 |
opencv-python-headless==4.10.0.84
|
| 14 |
|
| 15 |
-
# OCR (elige según tu vision_tools)
|
| 16 |
-
pytesseract>=0.3 # si usas Tesseract
|
| 17 |
-
easyocr>=1.7 # si prefieres EasyOCR
|
| 18 |
-
|
| 19 |
-
# Audio / vídeo (ajusta según audio_tools)
|
| 20 |
librosa>=0.10
|
| 21 |
soundfile>=0.12
|
| 22 |
pydub>=0.25
|
| 23 |
ffmpeg-python>=0.2
|
| 24 |
-
# (recuerda que el binario de ffmpeg no llega por pip; si lo necesitas, usa Docker o runtime con ffmpeg instalado)
|
| 25 |
|
| 26 |
-
# ML ligero para clustering OCR
|
| 27 |
scikit-learn>=1.5
|
| 28 |
sentence-transformers>=3.0
|
| 29 |
transformers>=4.44
|
| 30 |
-
# Torch CPU (para sentence-transformers). En Spaces CPU, instala la variante de CPU:
|
| 31 |
torch>=2.3,<3
|
| 32 |
|
| 33 |
-
# Vector DB
|
| 34 |
chromadb>=0.5.4
|
| 35 |
-
|
| 36 |
-
# (Opcional) moviepy si tu vision_tools la usa
|
| 37 |
moviepy>=2.0
|
| 38 |
-
|
| 39 |
-
# (Opcional) herramientas de robustez
|
| 40 |
tenacity>=8.2
|
|
|
|
|
|
|
| 1 |
fastapi==0.114.2
|
| 2 |
uvicorn[standard]==0.30.6
|
| 3 |
python-multipart==0.0.9
|
|
|
|
| 4 |
PyYAML>=6.0
|
| 5 |
requests>=2.32
|
| 6 |
+
gradio_client>=0.16.0
|
| 7 |
|
|
|
|
| 8 |
numpy>=1.26
|
| 9 |
Pillow>=10.4
|
| 10 |
opencv-python-headless==4.10.0.84
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
librosa>=0.10
|
| 13 |
soundfile>=0.12
|
| 14 |
pydub>=0.25
|
| 15 |
ffmpeg-python>=0.2
|
|
|
|
| 16 |
|
|
|
|
| 17 |
scikit-learn>=1.5
|
| 18 |
sentence-transformers>=3.0
|
| 19 |
transformers>=4.44
|
|
|
|
| 20 |
torch>=2.3,<3
|
| 21 |
|
|
|
|
| 22 |
chromadb>=0.5.4
|
|
|
|
|
|
|
| 23 |
moviepy>=2.0
|
|
|
|
|
|
|
| 24 |
tenacity>=8.2
|