None1145 commited on
Commit
07867c1
·
verified ·
1 Parent(s): eea5553

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -1,4 +1,20 @@
1
  import os
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  from huggingface_hub import snapshot_download
3
  print("Models...")
4
  snapshot_download(repo_id="None1145/GPT-SoVITS-Lappland-the-Decadenza", cache_dir="./Models")
@@ -6,8 +22,9 @@ print("Models!!!")
6
  print("PretrainedModels...")
7
  snapshot_download(repo_id="None1145/GPT-SoVITS-Base", cache_dir="./PretrainedModels")
8
  print("PretrainedModels!!!")
9
- cnhubert_base_path = "PretrainedModels/chinese-hubert-base"
10
- bert_path = "PretrainedModels/chinese-roberta-wwm-ext-large"
 
11
 
12
  import gradio as gr
13
  from transformers import AutoModelForMaskedLM, AutoTokenizer
 
1
  import os
2
+
3
+ def list_files_tree(directory, indent=""):
4
+ # 获取当前目录下的所有文件和文件夹
5
+ items = os.listdir(directory)
6
+ for i, item in enumerate(items):
7
+ # 定义前缀,最后一个文件或文件夹使用不同的前缀
8
+ prefix = "└── " if i == len(items) - 1 else "├── "
9
+ # 打印文件或文件夹
10
+ print(indent + prefix + item)
11
+ # 如果是文件夹,则递归调用
12
+ item_path = os.path.join(directory, item)
13
+ if os.path.isdir(item_path):
14
+ # 如果是最后一个子文件夹,使用缩进
15
+ next_indent = indent + (" " if i == len(items) - 1 else "│ ")
16
+ list_files_tree(item_path, next_indent)
17
+
18
  from huggingface_hub import snapshot_download
19
  print("Models...")
20
  snapshot_download(repo_id="None1145/GPT-SoVITS-Lappland-the-Decadenza", cache_dir="./Models")
 
22
  print("PretrainedModels...")
23
  snapshot_download(repo_id="None1145/GPT-SoVITS-Base", cache_dir="./PretrainedModels")
24
  print("PretrainedModels!!!")
25
+ list_files_tree("./")
26
+ cnhubert_base_path = "PretrainedModels/None1145/GPT-SoVITS-Base/chinese-hubert-base"
27
+ bert_path = "PretrainedModels/None1145/GPT-SoVITS-Base/chinese-roberta-wwm-ext-large"
28
 
29
  import gradio as gr
30
  from transformers import AutoModelForMaskedLM, AutoTokenizer