Spaces:
Runtime error
Runtime error
Zengyf-CVer
commited on
Commit
•
ae578ee
1
Parent(s):
f4ac225
pdf update
Browse files- util/pdf_opt.py +5 -2
util/pdf_opt.py
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
-
#
|
|
|
|
|
2 |
|
3 |
from fpdf import FPDF
|
4 |
|
5 |
-
|
6 |
title = "Gradio YOLOv5 Det v0.2"
|
7 |
|
8 |
|
9 |
class PDF(FPDF):
|
|
|
10 |
def header(self):
|
11 |
# 设置中文字体
|
12 |
self.add_font("SimSun", "", "./fonts/SimSun.ttf", uni=True)
|
|
|
1 |
+
# PDF管理
|
2 |
+
# 创建人:曾逸夫
|
3 |
+
# 创建时间:2022-05-05
|
4 |
|
5 |
from fpdf import FPDF
|
6 |
|
7 |
+
|
8 |
title = "Gradio YOLOv5 Det v0.2"
|
9 |
|
10 |
|
11 |
class PDF(FPDF):
|
12 |
+
# 参考:https://pyfpdf.readthedocs.io/en/latest/Tutorial/index.html
|
13 |
def header(self):
|
14 |
# 设置中文字体
|
15 |
self.add_font("SimSun", "", "./fonts/SimSun.ttf", uni=True)
|