vincenthugging commited on
Commit
34d2a8c
·
1 Parent(s): 136b79d

🔧 Fix Space runtime errors

Browse files

- 移除 Gradio queue() 的 concurrency_count 参数(已废弃)
- 移除 hf_hub_download 的 resume_download 参数(已废弃)
- 更新 Gradio 版本要求为 >=4.20.0 确保兼容性

修复错误:
- TypeError: Blocks.queue() got an unexpected keyword argument 'concurrency_count'
- FutureWarning: resume_download is deprecated

Files changed (2) hide show
  1. app.py +1 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -54,7 +54,6 @@ try:
54
  repo_id="fnlp/XY_Tokenizer_TTSD_V0",
55
  filename="xy_tokenizer.ckpt",
56
  cache_dir="XY_Tokenizer/weights",
57
- resume_download=True,
58
  )
59
  except Exception as e: # noqa: BLE001
60
  # 失败时保留占位路径,稍后初始化时再提示
@@ -342,7 +341,7 @@ def create_space_ui() -> gr.Blocks:
342
  demo = create_space_ui()
343
 
344
  def main():
345
- demo.queue(concurrency_count=1, max_size=16).launch()
346
 
347
 
348
  if __name__ == "__main__":
 
54
  repo_id="fnlp/XY_Tokenizer_TTSD_V0",
55
  filename="xy_tokenizer.ckpt",
56
  cache_dir="XY_Tokenizer/weights",
 
57
  )
58
  except Exception as e: # noqa: BLE001
59
  # 失败时保留占位路径,稍后初始化时再提示
 
341
  demo = create_space_ui()
342
 
343
  def main():
344
+ demo.queue(max_size=16).launch()
345
 
346
 
347
  if __name__ == "__main__":
requirements.txt CHANGED
@@ -1,7 +1,7 @@
1
  torch
2
  torchaudio
3
  transformers>=4.30.0
4
- gradio>=4.0.0
5
  numpy
6
  accelerate
7
  soundfile
 
1
  torch
2
  torchaudio
3
  transformers>=4.30.0
4
+ gradio>=4.20.0
5
  numpy
6
  accelerate
7
  soundfile