whisperkey / pyproject.toml
chiruu12's picture
Deploy: working gr.Server frontend + review fixes
5a811e2 verified
Raw
History Blame Contribute Delete
2.63 kB
[project]
name = "jailbreak-dojo"
version = "0.1.0"
description = "Outwit a small AI guardian past Unplug's defenses - a Build Small Hackathon game (Gradio + Hugging Face Space)"
authors = [{name = "Chirag Gupta", email = "chiragzana@gomanzanas.com"}]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.11"
keywords = ["gradio", "hugging-face", "small-models", "prompt-injection", "unplug", "game", "minicpm"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Topic :: Games/Entertainment",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
# Core = the thin Gradio frontend that calls the Modal guardian over HTTP. The heavy ML libs are
# NOT here - they live in modal_app.py's image (cloud-built) or as optional extras below.
dependencies = [
"gradio>=6.16,<7", # pinned to v6 to match the Space README sdk_version (6.x)
"httpx>=0.27", # the Modal-backend client (the primary guardian path)
"huggingface-hub>=0.23", # leaderboard + corpus Datasets (CommitScheduler)
"unplug-ai", # the security engine (the shields) - see [tool.uv.sources]
]
[project.optional-dependencies]
offline = ["llama-cpp-python>=0.3"] # local CPU guardian (Offline Mode)
local-gpu = ["transformers>=4.44", "torch>=2.2", "accelerate>=0.30", "sentencepiece>=0.2"]
deploy = ["modal>=0.64"] # to deploy modal_app.py
# The exact heavy set the HF Space installs (mirrors requirements.txt) so L5's unplug-tiny ML runs
# there. `uv sync --extra space` reproduces the deployed env; keep in lockstep with requirements.txt.
space = ["torch>=2.2", "transformers>=4.44,<6", "sentencepiece>=0.2"]
[project.urls]
Homepage = "https://github.com/chiruu12/jailbreak-dojo"
Repository = "https://github.com/chiruu12/jailbreak-dojo"
# Same git pin as requirements.txt (the HF Space install path). To hack on a local Unplug checkout,
# override with: unplug-ai = { path = "../Unplug/sdk", editable = true }
[tool.uv.sources]
unplug-ai = { git = "https://github.com/chiruu12/Unplug.git", rev = "f4c0616d02fc737818f4de2c7ef3a4fd69b34ae6", subdirectory = "sdk" }
[build-system]
requires = ["uv_build>=0.10.6,<0.11.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"pytest>=9.0.2",
"ruff>=0.15.4",
]
[tool.ruff]
line-length = 120 # embedded CSS/HTML strings + readable test asserts run long
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]