llzzyy233 commited on
Commit
6c08baf
1 Parent(s): 7d1f64a

设置plt中文显示

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from ultralytics import YOLO
5
  import matplotlib.pyplot as plt
6
  import io
7
  from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
8
- plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签
9
  plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
10
  model = YOLO(r'pcb-best.pt')
11
 
 
5
  import matplotlib.pyplot as plt
6
  import io
7
  from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
8
+ plt.rcParams['font.family'] = 'SimHei' # 用来正常显示中文标签
9
  plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
10
  model = YOLO(r'pcb-best.pt')
11