LXC-Frontend (FastAPI + HTML/JS): - Audio-Upload (MP3/WAV/M4A/MP4/OGG/FLAC, max. 500 MB) - SQLite Job-Store, BackgroundTask-Pipeline - Job-Liste mit Live-Status, Downloads (DOCX + JSON) - Mac-Health-Indicator im UI Mac-Worker (FastAPI): - /api/transcribe (lightning-whisper-mlx | faster-whisper | mock) - /api/summarize + /api/protocol via Ollama (llama3.1:8b) - /api/export/docx via python-docx Deploy: - systemd-Service, Nginx Reverse-Proxy - deploy/install.sh: idempotentes LXC-Setup Doku: README.md, lxc-frontend/README.md, mac-worker/README.md
15 lines
362 B
Python
15 lines
362 B
Python
from sqlmodel import SQLModel, create_engine, Session
|
|
from .config import settings
|
|
|
|
engine = create_engine(settings.db_url, connect_args={"check_same_thread": False})
|
|
|
|
|
|
def init_db() -> None:
|
|
from app.models.job import Job # noqa: F401
|
|
SQLModel.metadata.create_all(engine)
|
|
|
|
|
|
def get_session():
|
|
with Session(engine) as session:
|
|
yield session
|