mason369 commited on
Commit
8fe1fb3
·
verified ·
1 Parent(s): 4d28286

Move HF Space to Gradio 5

Browse files
AGENTS.md CHANGED
@@ -65,7 +65,7 @@ python -c "import torch; print(torch.cuda.is_available())"
65
  - Display name assembly: `_get_display_name()` appends `(500 epochs·40k)` style training info
66
 
67
  **UI** (`ui/app.py`):
68
- - Gradio 4.44.1, single-file ~2000 lines
69
  - i18n via `i18n/zh_CN.json`, accessed through `t(key, section)` helper
70
  - Three main tabs: song cover (full pipeline), model management, settings
71
  - Cover tab features:
@@ -116,7 +116,7 @@ python -c "import torch; print(torch.cuda.is_available())"
116
  - `fairseq` is pinned to `0.12.2` — HuBERT loading breaks on other versions
117
  - `audio-separator` must be installed with `[gpu]` extra for CUDA support
118
  - Roformer model auto-downloads on first use to `assets/separator_models/`
119
- - Gradio is pinned to `4.44.1`; `huggingface_hub` is kept below 1.0 because this Gradio release still imports `HfFolder`
120
  - Model weights (.pt, .pth) and audio files are gitignored — never commit them
121
  - Path handling uses `pathlib.Path` for cross-platform compatibility (Windows/Linux)
122
  - Virtual environment activation differs by platform: `Scripts/Activate.ps1` (Windows) vs `bin/activate` (Linux)
 
65
  - Display name assembly: `_get_display_name()` appends `(500 epochs·40k)` style training info
66
 
67
  **UI** (`ui/app.py`):
68
+ - Gradio 5.49.1, single-file ~2000 lines
69
  - i18n via `i18n/zh_CN.json`, accessed through `t(key, section)` helper
70
  - Three main tabs: song cover (full pipeline), model management, settings
71
  - Cover tab features:
 
116
  - `fairseq` is pinned to `0.12.2` — HuBERT loading breaks on other versions
117
  - `audio-separator` must be installed with `[gpu]` extra for CUDA support
118
  - Roformer model auto-downloads on first use to `assets/separator_models/`
119
+ - Gradio is pinned to `5.49.1`; `huggingface_hub` is kept below 1.0 to stay aligned with the HF Space runtime
120
  - Model weights (.pt, .pth) and audio files are gitignored — never commit them
121
  - Path handling uses `pathlib.Path` for cross-platform compatibility (Windows/Linux)
122
  - Virtual environment activation differs by platform: `Scripts/Activate.ps1` (Windows) vs `bin/activate` (Linux)
CLAUDE.md CHANGED
@@ -65,7 +65,7 @@ python -c "import torch; print(torch.cuda.is_available())"
65
  - Display name assembly: `_get_display_name()` appends `(500 epochs·40k)` style training info
66
 
67
  **UI** (`ui/app.py`):
68
- - Gradio 4.44.1, single-file ~2000 lines
69
  - i18n via `i18n/zh_CN.json`, accessed through `t(key, section)` helper
70
  - Three main tabs: song cover (full pipeline), model management, settings
71
  - Cover tab features:
@@ -116,7 +116,7 @@ python -c "import torch; print(torch.cuda.is_available())"
116
  - `fairseq` is pinned to `0.12.2` — HuBERT loading breaks on other versions
117
  - `audio-separator` must be installed with `[gpu]` extra for CUDA support
118
  - Roformer model auto-downloads on first use to `assets/separator_models/`
119
- - Gradio is pinned to `4.44.1`; `huggingface_hub` is kept below 1.0 because this Gradio release still imports `HfFolder`
120
  - Model weights (.pt, .pth) and audio files are gitignored — never commit them
121
  - Path handling uses `pathlib.Path` for cross-platform compatibility (Windows/Linux)
122
  - Virtual environment activation differs by platform: `Scripts/Activate.ps1` (Windows) vs `bin/activate` (Linux)
 
65
  - Display name assembly: `_get_display_name()` appends `(500 epochs·40k)` style training info
66
 
67
  **UI** (`ui/app.py`):
68
+ - Gradio 5.49.1, single-file ~2000 lines
69
  - i18n via `i18n/zh_CN.json`, accessed through `t(key, section)` helper
70
  - Three main tabs: song cover (full pipeline), model management, settings
71
  - Cover tab features:
 
116
  - `fairseq` is pinned to `0.12.2` — HuBERT loading breaks on other versions
117
  - `audio-separator` must be installed with `[gpu]` extra for CUDA support
118
  - Roformer model auto-downloads on first use to `assets/separator_models/`
119
+ - Gradio is pinned to `5.49.1`; `huggingface_hub` is kept below 1.0 to stay aligned with the HF Space runtime
120
  - Model weights (.pt, .pth) and audio files are gitignored — never commit them
121
  - Path handling uses `pathlib.Path` for cross-platform compatibility (Windows/Linux)
122
  - Virtual environment activation differs by platform: `Scripts/Activate.ps1` (Windows) vs `bin/activate` (Linux)
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🎤
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
@@ -20,7 +20,7 @@ AI-RVC 是一个基于 **RVC v2** 的一键 AI 翻唱与声音转换 WebUI。上
20
  ## 功能特点
21
 
22
  - **AI 歌曲翻唱**:上传 MP3/WAV/FLAC,自动分离人声、转换音色、混合伴奏,一键生成 AI cover。
23
- - **人声分离**:默认 `audio-separator` 0.44.1 ensemble 预设(`ensemble:vocal_rvc`),配合 Gradio 4 / NumPy 2 运行,可处理常见歌曲里的主唱与伴奏分离。
24
  - **音色转换**:RVC v2 架构 + FAISS 检索增强流程,搭配角色模型完成声线转换。
25
  - **RMVPE 音高提取**:用于提取 F0 基频曲线,让旋律和音高更稳。
26
  - **角色模型**:内置 117 个可下载角色模型,支持系列筛选和关键词搜索。
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.49.1
8
  python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
 
20
  ## 功能特点
21
 
22
  - **AI 歌曲翻唱**:上传 MP3/WAV/FLAC,自动分离人声、转换音色、混合伴奏,一键生成 AI cover。
23
+ - **人声分离**:默认 `audio-separator` 0.44.1 ensemble 预设(`ensemble:vocal_rvc`),配合 Gradio 5 / NumPy 2 运行,可处理常见歌曲里的主唱与伴奏分离。
24
  - **音色转换**:RVC v2 架构 + FAISS 检索增强流程,搭配角色模型完成声线转换。
25
  - **RMVPE 音高提取**:用于提取 F0 基频曲线,让旋律和音高更稳。
26
  - **角色模型**:内置 117 个可下载角色模型,支持系列筛选和关键词搜索。
README_HF.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🎤
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 4.44.1
8
  python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
@@ -20,7 +20,7 @@ AI-RVC 是一个基于 **RVC v2** 的一键 AI 翻唱与声音转换 WebUI。上
20
  ## 功能特点
21
 
22
  - **AI 歌曲翻唱**:上传 MP3/WAV/FLAC,自动分离人声、转换音色、混合伴奏,一键生成 AI cover。
23
- - **人声分离**:默认 `audio-separator` 0.44.1 ensemble 预设(`ensemble:vocal_rvc`),配合 Gradio 4 / NumPy 2 运行,可处理常见歌曲里的主唱与伴奏分离。
24
  - **音色转换**:RVC v2 架构 + FAISS 检索增强流程,搭配角色模型完成声线转换。
25
  - **RMVPE 音高提取**:用于提取 F0 基频曲线,让旋律和音高更稳。
26
  - **角色模型**:内置 117 个可下载角色模型,支持系列筛选和关键词搜索。
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 5.49.1
8
  python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
 
20
  ## 功能特点
21
 
22
  - **AI 歌曲翻唱**:上传 MP3/WAV/FLAC,自动分离人声、转换音色、混合伴奏,一键生成 AI cover。
23
+ - **人声分离**:默认 `audio-separator` 0.44.1 ensemble 预设(`ensemble:vocal_rvc`),配合 Gradio 5 / NumPy 2 运行,可处理常见歌曲里的主唱与伴奏分离。
24
  - **音色转换**:RVC v2 架构 + FAISS 检索增强流程,搭配角色模型完成声线转换。
25
  - **RMVPE 音高提取**:用于提取 F0 基频曲线,让旋律和音高更稳。
26
  - **角色模型**:内置 117 个可下载角色模型,支持系列筛选和关键词搜索。
install.py CHANGED
@@ -27,7 +27,7 @@ PYTHON310_CANDIDATES = [
27
  PACKAGES = {
28
  "torch": {"import": "torch", "name": "PyTorch", "pip": "torch"},
29
  "torchaudio": {"import": "torchaudio", "name": "torchaudio", "pip": "torchaudio"},
30
- "gradio": {"import": "gradio", "name": "Gradio", "pip": "gradio==4.44.1"},
31
  "librosa": {"import": "librosa", "name": "librosa", "pip": "librosa"},
32
  "soundfile": {"import": "soundfile", "name": "soundfile", "pip": "soundfile"},
33
  "av": {"import": "av", "name": "PyAV", "pip": "av"},
 
27
  PACKAGES = {
28
  "torch": {"import": "torch", "name": "PyTorch", "pip": "torch"},
29
  "torchaudio": {"import": "torchaudio", "name": "torchaudio", "pip": "torchaudio"},
30
+ "gradio": {"import": "gradio", "name": "Gradio", "pip": "gradio==5.49.1"},
31
  "librosa": {"import": "librosa", "name": "librosa", "pip": "librosa"},
32
  "soundfile": {"import": "soundfile", "name": "soundfile", "pip": "soundfile"},
33
  "av": {"import": "av", "name": "PyAV", "pip": "av"},
requirements.txt CHANGED
@@ -7,7 +7,7 @@ torch>=2.0.0
7
  torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
- gradio==4.44.1
11
  fastapi>=0.115,<1
12
  anyio>=3,<5
13
  pydantic>=2,<3
 
7
  torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
+ gradio==5.49.1
11
  fastapi>=0.115,<1
12
  anyio>=3,<5
13
  pydantic>=2,<3
requirements_hf.txt CHANGED
@@ -7,7 +7,7 @@ torch>=2.0.0
7
  torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
- gradio==4.44.1
11
  fastapi>=0.115,<1
12
  anyio>=3,<5
13
  pydantic>=2,<3
 
7
  torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
+ gradio==5.49.1
11
  fastapi>=0.115,<1
12
  anyio>=3,<5
13
  pydantic>=2,<3
tests/test_hf_entrypoint.py CHANGED
@@ -28,12 +28,12 @@ class HuggingFaceEntrypointTests(unittest.TestCase):
28
 
29
  self.assertIn('python_version: "3.10"', readme)
30
 
31
- def test_space_requirements_keep_gradio_4_audio_separator_pins(self):
32
  requirements = (REPO_ROOT / "requirements_hf.txt").read_text(
33
  encoding="utf-8"
34
  )
35
 
36
- self.assertIn("gradio==4.44.1", requirements)
37
  self.assertIn("fastapi>=0.115,<1", requirements)
38
  self.assertIn("pydantic>=2,<3", requirements)
39
  self.assertIn("jinja2>=3.1,<4", requirements)
 
28
 
29
  self.assertIn('python_version: "3.10"', readme)
30
 
31
+ def test_space_requirements_keep_gradio_5_audio_separator_pins(self):
32
  requirements = (REPO_ROOT / "requirements_hf.txt").read_text(
33
  encoding="utf-8"
34
  )
35
 
36
+ self.assertIn("gradio==5.49.1", requirements)
37
  self.assertIn("fastapi>=0.115,<1", requirements)
38
  self.assertIn("pydantic>=2,<3", requirements)
39
  self.assertIn("jinja2>=3.1,<4", requirements)
ui/app.py CHANGED
@@ -1318,7 +1318,7 @@ table thead td,
1318
  border-color: #404040 !important;
1319
  }
1320
 
1321
- /* Gradio 4.x Dataframe 表头 */
1322
  .svelte-1kcgrqr thead th,
1323
  .svelte-1kcgrqr thead td,
1324
  .cell-wrap span,
@@ -1372,7 +1372,7 @@ input[type="range"] {
1372
  accent-color: #ff9800 !important;
1373
  }
1374
 
1375
- /* Gradio 4.x 音频波形 */
1376
  .waveform-container,
1377
  .audio-container {
1378
  --waveform-color: #ff9800 !important;
 
1318
  border-color: #404040 !important;
1319
  }
1320
 
1321
+ /* Gradio 4/5 Dataframe 表头 */
1322
  .svelte-1kcgrqr thead th,
1323
  .svelte-1kcgrqr thead td,
1324
  .cell-wrap span,
 
1372
  accent-color: #ff9800 !important;
1373
  }
1374
 
1375
+ /* Gradio 4/5 音频波形 */
1376
  .waveform-container,
1377
  .audio-container {
1378
  --waveform-color: #ff9800 !important;