Рабочий пайплайн: YouTube -> транскрипция -> выжимка -> Postgres

- новый api/: /pipeline/process (yt-dlp, субтитры или Vosk, LLM/экстрактивная
  суммаризация), /videos, /llm; старый код перенесён в api_legacy/
- web/: Flet UI (flet 0.28.3 + flet-web, порт 8550)
- Dockerfile.api: ffmpeg слоем из mwader/static-ffmpeg, pip с кэш-маунтом
- requirements/pyproject: убраны moviepy, imageio-ffmpeg, битый asyncio
- README с инструкцией запуска и загрузкой Vosk-модели

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jze9
2026-07-14 11:12:46 +05:00
parent 564c9c2d2f
commit 2697e01714
51 changed files with 2313 additions and 284 deletions

View File

@@ -1,22 +1,28 @@
import asyncio
import logging
from contextlib import asynccontextmanager
from fastapi import FastAPI
from api.route import default, subscription
# renamed route modules for clarity
from api.route import users, installing, media_convert, mp3_ffmpeg_stream, moviepy
#from api.db.subscription import init_db
#from api.db.connection import wait_for_db
app = FastAPI(title="LLM-infa API")
from api.db.connection import wait_for_postgres, init_db
from api.route import default, llm, pipeline, videos
#@app.on_event("startup")
#async def on_startup():
# await wait_for_db()
# await init_db()
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
)
@asynccontextmanager
async def lifespan(app: FastAPI):
await wait_for_postgres()
await init_db()
yield
app = FastAPI(title="LLM-infa API", version="0.3.0", lifespan=lifespan)
app.include_router(default.router)
#app.include_router(subscription.router)
#app.include_router(users.router)
app.include_router(installing.router)
app.include_router(media_convert.router)
app.include_router(mp3_ffmpeg_stream.router)
app.include_router(moviepy.router)
app.include_router(pipeline.router)
app.include_router(videos.router)
app.include_router(llm.router)