Spaces:
Running
Running
设置plt中文显示
Browse files
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.
|
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 |
|