mason369 commited on
Commit
31e53d8
·
verified ·
1 Parent(s): 76f3fc9

Pin Space runtime compatibility

Browse files
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.50.2
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.50.2
8
+ python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
11
  license: mit
README_HF.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.50.2
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.50.2
8
+ python_version: "3.10"
9
  app_file: app.py
10
  pinned: false
11
  license: mit
requirements.txt CHANGED
@@ -8,12 +8,13 @@ torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
  gradio==3.50.2
 
11
 
12
  # 音频处理
13
  librosa>=0.9.0
14
  soundfile>=0.12.0
15
  scipy>=1.10.0
16
- numpy>=1.23.0
17
  praat-parselmouth>=0.4.3
18
  torchcrepe>=0.0.20
19
 
 
8
 
9
  # Gradio 界面
10
  gradio==3.50.2
11
+ jinja2<3.1.5
12
 
13
  # 音频处理
14
  librosa>=0.9.0
15
  soundfile>=0.12.0
16
  scipy>=1.10.0
17
+ numpy<2,>=1.23.0
18
  praat-parselmouth>=0.4.3
19
  torchcrepe>=0.0.20
20
 
requirements_hf.txt CHANGED
@@ -8,12 +8,13 @@ torchaudio>=2.0.0
8
 
9
  # Gradio 界面
10
  gradio==3.50.2
 
11
 
12
  # 音频处理
13
  librosa>=0.9.0
14
  soundfile>=0.12.0
15
  scipy>=1.10.0
16
- numpy>=1.23.0
17
  praat-parselmouth>=0.4.3
18
  torchcrepe>=0.0.20
19
 
 
8
 
9
  # Gradio 界面
10
  gradio==3.50.2
11
+ jinja2<3.1.5
12
 
13
  # 音频处理
14
  librosa>=0.9.0
15
  soundfile>=0.12.0
16
  scipy>=1.10.0
17
+ numpy<2,>=1.23.0
18
  praat-parselmouth>=0.4.3
19
  torchcrepe>=0.0.20
20
 
tests/test_hf_entrypoint.py CHANGED
@@ -23,6 +23,20 @@ class HuggingFaceEntrypointTests(unittest.TestCase):
23
  {"host", "port", "share"},
24
  )
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  if __name__ == "__main__":
28
  unittest.main()
 
23
  {"host", "port", "share"},
24
  )
25
 
26
+ def test_space_metadata_pins_python_310(self):
27
+ readme = (REPO_ROOT / "README_HF.md").read_text(encoding="utf-8")
28
+
29
+ self.assertIn('python_version: "3.10"', readme)
30
+
31
+ def test_space_requirements_keep_gradio_3_compatibility_pins(self):
32
+ requirements = (REPO_ROOT / "requirements_hf.txt").read_text(
33
+ encoding="utf-8"
34
+ )
35
+
36
+ self.assertIn("gradio==3.50.2", requirements)
37
+ self.assertIn("jinja2<3.1.5", requirements)
38
+ self.assertIn("numpy<2,>=1.23.0", requirements)
39
+
40
 
41
  if __name__ == "__main__":
42
  unittest.main()