build-small-hackathon/Hackathon-IA-VisualNovel
5
1[project]2name = "hackathon-ia-visualnovel"3version = "0.1.0"4description = "An AI-improvised, voice-or-text anime visual novel — Build Small Hackathon (Thousand Token Wood)."5readme = "README.md"6license = { text = "Apache-2.0" }7# 3.14 is pinned in .python-version. We allow >=3.11 so the project still installs if a heavy8# ML wheel (torch / llama-cpp-python / ctranslate2) doesn't yet ship a 3.14 build — just9# `uv python pin 3.12` and re-sync. The package itself is 3.11+ clean.10requires-python = ">=3.11"11dependencies = [12 "gradio>=5.0",13 "pydantic>=2.7",14 "pillow>=10.0",15 "huggingface-hub>=1.17.0",16 "python-dotenv>=1.0",17 "psutil>=5.9",18]19 20[project.optional-dependencies]21# Heavy backends are OPTIONAL so the mock loop installs in seconds. Add per platform — see README.22# uv sync --extra llamacpp # llama.cpp LLM (local; the Llama-Champion bonus)23# uv sync --extra transformers # HF transformers LLM (the ZeroGPU Space fallback)24# uv sync --extra image # SDXL-Turbo via diffusers25# uv sync --extra stt # faster-whisper microphone input26llamacpp = ["llama-cpp-python>=0.3.0"]27transformers = ["transformers>=4.44", "accelerate>=0.33", "torch>=2.3"]28image = ["diffusers>=0.38.0", "transformers>=4.44", "accelerate>=0.33", "torch>=2.3", "safetensors>=0.4", "rembg>=2.0", "peft>=0.11"]29stt = ["faster-whisper>=1.0", "sounddevice>=0.5.5"]30tts = ["kokoro-onnx>=0.3", "soundfile>=0.12"]31matting = ["transformers>=4.44", "torch>=2.3"] # BiRefNet for transparent sprites (Phase 2)32spaces = ["spaces>=0.30"] # ZeroGPU decorator on HF Spaces33modal = ["modal>=1.0"] # cloud GPU via Modal (LLM + painter)34dev = ["ruff>=0.6", "pytest>=8.0", "matplotlib>=3.9"]35 36 37[tool.ruff]38line-length = 10039target-version = "py311"40 41[tool.ruff.lint]42select = ["E", "F", "I", "UP", "B"]43ignore = ["E501", "E402"] # E501: long prompt/doc lines; E402: mode bootstrap before visualnovel imports44 45[tool.pytest.ini_options]46addopts = "-q"47testpaths = ["tests"]48 49[build-system]50requires = ["hatchling"]51build-backend = "hatchling.build"52 53[dependency-groups]54dev = [55 "pytest>=9.0.3",56 "ruff>=0.15.15",57]58 59[tool.hatch.build.targets.wheel]60packages = ["visualnovel"]61 