Zengyf-CVer commited on
Commit
f0750c4
1 Parent(s): 47afbd4

app update

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. util/fonts_opt.py +3 -1
requirements.txt CHANGED
@@ -5,10 +5,10 @@ numpy
5
  pandas
6
  pyyaml
7
  pillow
 
8
  wget>=3.2
9
  rich>=12.2.0
10
  fpdf>=1.7.2
11
  plotly>=5.7.0
12
  bokeh>=2.4.2
13
  openpyxl>=3.0.10
14
-
 
5
  pandas
6
  pyyaml
7
  pillow
8
+ torch
9
  wget>=3.2
10
  rich>=12.2.0
11
  fpdf>=1.7.2
12
  plotly>=5.7.0
13
  bokeh>=2.4.2
14
  openpyxl>=3.0.10
 
util/fonts_opt.py CHANGED
@@ -5,6 +5,7 @@
5
  import os
6
  import sys
7
  from pathlib import Path
 
8
 
9
  import wget
10
  from rich.console import Console
@@ -37,7 +38,8 @@ def add_fronts(font_diff):
37
 
38
  try:
39
  # 下载字体文件
40
- wget.download(v, file_path)
 
41
  except Exception as e:
42
  print("路径错误!程序结束!")
43
  print(e)
 
5
  import os
6
  import sys
7
  from pathlib import Path
8
+ import torch
9
 
10
  import wget
11
  from rich.console import Console
 
38
 
39
  try:
40
  # 下载字体文件
41
+ # wget.download(v, file_path)
42
+ torch.hub.download_url_to_file(v, file_path)
43
  except Exception as e:
44
  print("路径错误!程序结束!")
45
  print(e)