Spaces:
Running on Zero
Fix Space build: pin full dependency chain to resolve pip resolver failure
Browse filesqwen-asr leaves several transitive deps unpinned (librosa, qwen-omni-utils,
flask, sox, pytz), which combined with our own loose torch/numpy bounds
made pip's resolver back-track across a huge version matrix and hit
"Dependency resolution exceeded maximum depth". Pin the whole chain to
exact, verified-compatible versions instead.
This also surfaced two real incompatibilities, fixed by pinning:
- gradio>=6.18.0 requires huggingface-hub>=1.2.0, which conflicts with
transformers==4.57.6 (hard-pinned by qwen-asr, needs huggingface-hub<1.0).
Capped sdk_version/gradio at 6.17.3.
- soynlp==0.0.493 (hard-pinned by qwen-asr) fails to build on Python 3.12+.
Pinned Space python_version to 3.11.
Verified with `pip install --dry-run` against HF's exact injected build
constraints, and a real `python app.py` smoke test on the pinned versions.
- README.md +6 -3
- pyproject.toml +16 -6
- requirements.txt +29 -5
|
@@ -4,8 +4,8 @@ emoji: 🎯
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.
|
| 8 |
-
python_version: '3.
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: apache-2.0
|
|
@@ -59,8 +59,11 @@ Portuguese, Russian, Spanish, Vietnamese.
|
|
| 59 |
|
| 60 |
### Local development
|
| 61 |
|
|
|
|
|
|
|
|
|
|
| 62 |
```bash
|
| 63 |
-
|
| 64 |
pip install -e .
|
| 65 |
python app.py
|
| 66 |
```
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.17.3
|
| 8 |
+
python_version: '3.11'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: apache-2.0
|
|
|
|
| 59 |
|
| 60 |
### Local development
|
| 61 |
|
| 62 |
+
Use Python 3.10 or 3.11 — `soynlp` (a transitive dependency pulled in by
|
| 63 |
+
`qwen-asr`) fails to build on 3.12+.
|
| 64 |
+
|
| 65 |
```bash
|
| 66 |
+
python3.11 -m venv .venv && source .venv/bin/activate
|
| 67 |
pip install -e .
|
| 68 |
python app.py
|
| 69 |
```
|
|
@@ -3,14 +3,24 @@ name = "qwen3-force-aligner-space"
|
|
| 3 |
version = "0.1.0"
|
| 4 |
description = "Gradio Space wrapping Qwen3-ForcedAligner-0.6B for text-audio forced alignment"
|
| 5 |
readme = "README.md"
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
license = { text = "Apache-2.0" }
|
| 8 |
dependencies = [
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
"
|
| 13 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
]
|
| 15 |
|
| 16 |
[project.optional-dependencies]
|
|
|
|
| 3 |
version = "0.1.0"
|
| 4 |
description = "Gradio Space wrapping Qwen3-ForcedAligner-0.6B for text-audio forced alignment"
|
| 5 |
readme = "README.md"
|
| 6 |
+
# Capped at <3.12: soynlp==0.0.493 (a hard pin of qwen-asr) fails to build
|
| 7 |
+
# on Python 3.12+. See requirements.txt for the full explanation.
|
| 8 |
+
requires-python = ">=3.10,<3.12"
|
| 9 |
license = { text = "Apache-2.0" }
|
| 10 |
dependencies = [
|
| 11 |
+
# gradio must stay <6.18.0 (huggingface-hub conflict with transformers
|
| 12 |
+
# via qwen-asr) — see requirements.txt for details. Matches README.md's
|
| 13 |
+
# sdk_version.
|
| 14 |
+
"gradio==6.17.3",
|
| 15 |
+
"qwen-asr==0.0.6",
|
| 16 |
+
"torch==2.11.0",
|
| 17 |
+
"numpy==2.4.6",
|
| 18 |
+
"soundfile==0.14.0",
|
| 19 |
+
"librosa==0.11.0",
|
| 20 |
+
"qwen-omni-utils==0.0.9",
|
| 21 |
+
"flask==3.1.3",
|
| 22 |
+
"sox==1.5.0",
|
| 23 |
+
"pytz==2026.2",
|
| 24 |
]
|
| 25 |
|
| 26 |
[project.optional-dependencies]
|
|
@@ -1,7 +1,31 @@
|
|
| 1 |
# This is what the Hugging Face Space build actually installs (Spaces read
|
| 2 |
# requirements.txt, not pyproject.toml). Keep in sync with pyproject.toml.
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# This is what the Hugging Face Space build actually installs (Spaces read
|
| 2 |
# requirements.txt, not pyproject.toml). Keep in sync with pyproject.toml.
|
| 3 |
+
#
|
| 4 |
+
# gradio itself is intentionally NOT pinned here: the Space builder already
|
| 5 |
+
# installs the exact `sdk_version` from README.md's frontmatter, and adding
|
| 6 |
+
# a second, looser requirement for it here only grows the resolver's search
|
| 7 |
+
# space.
|
| 8 |
+
#
|
| 9 |
+
# qwen-asr's own metadata leaves several transitive deps unpinned
|
| 10 |
+
# (librosa, qwen-omni-utils, flask, sox, pytz), which combined with a bare
|
| 11 |
+
# numpy/torch requirement makes pip's resolver back-track across a huge
|
| 12 |
+
# version matrix and fail with "Dependency resolution exceeded maximum
|
| 13 |
+
# depth". Pinning the whole chain to exact, known-mutually-compatible
|
| 14 |
+
# versions keeps the search space small.
|
| 15 |
+
#
|
| 16 |
+
# Two constraints this pins around, verified with `pip install --dry-run`:
|
| 17 |
+
# - gradio must stay <6.18.0: 6.18.0+ requires huggingface-hub>=1.2.0,
|
| 18 |
+
# which conflicts with transformers==4.57.6 (pinned by qwen-asr, needs
|
| 19 |
+
# huggingface-hub<1.0). README.md's sdk_version is pinned to 6.17.3
|
| 20 |
+
# to match — bump both together or not at all.
|
| 21 |
+
# - Space python_version must stay 3.11 (see README.md): soynlp==0.0.493
|
| 22 |
+
# (pinned by qwen-asr) fails to build on Python 3.12+.
|
| 23 |
+
torch==2.11.0
|
| 24 |
+
numpy==2.4.6
|
| 25 |
+
soundfile==0.14.0
|
| 26 |
+
librosa==0.11.0
|
| 27 |
+
qwen-omni-utils==0.0.9
|
| 28 |
+
flask==3.1.3
|
| 29 |
+
sox==1.5.0
|
| 30 |
+
pytz==2026.2
|
| 31 |
+
qwen-asr==0.0.6
|