Spaces:
Running
Running
TheEeeeLin
commited on
Commit
•
ff0f164
1
Parent(s):
434720c
update
Browse files- demo/assets/title.md +2 -1
- demo/ui.py +6 -1
demo/assets/title.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7 |
<a href="https://github.com/xiaolin199912/HivisionIDPhotos"><img alt="Github" src="https://img.shields.io/static/v1?label=GitHub&message=GitHub&color=black"></a>  
|
8 |
<a href="https://docs.qq.com/doc/DUkpBdk90eWZFS2JW" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/WeChat-微信-4cb55e"></a>  
|
9 |
<a href="https://github.com/xiaolin199912/HivisionIDPhotos/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/zeyi-lin/hivisionidphotos?color=ffcb47&labelColor=black&style=flat-square"></a>  
|
10 |
-
<a href="https://
|
|
|
11 |
</div>
|
12 |
</div>
|
|
|
7 |
<a href="https://github.com/xiaolin199912/HivisionIDPhotos"><img alt="Github" src="https://img.shields.io/static/v1?label=GitHub&message=GitHub&color=black"></a>  
|
8 |
<a href="https://docs.qq.com/doc/DUkpBdk90eWZFS2JW" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/WeChat-微信-4cb55e"></a>  
|
9 |
<a href="https://github.com/xiaolin199912/HivisionIDPhotos/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/zeyi-lin/hivisionidphotos?color=ffcb47&labelColor=black&style=flat-square"></a>  
|
10 |
+
<a href="https://swanlab.cn?utm_source=hivision_demo"><img alt="SwanLab" src="https://img.shields.io/badge/Training%20by-SwanLab-4cb55e"></a>  
|
11 |
+
<a href="https://github.com/Zeyi-Lin/HivisionIDPhotos/blob/master/docs/api_CN.md" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/API_Docs-API文档-315bce"></a>
|
12 |
</div>
|
13 |
</div>
|
demo/ui.py
CHANGED
@@ -11,6 +11,9 @@ from demo.processor import IDPhotoProcessor
|
|
11 |
|
12 |
|
13 |
def load_description(fp):
|
|
|
|
|
|
|
14 |
with open(fp, "r", encoding="utf-8") as f:
|
15 |
content = f.read()
|
16 |
return content
|
@@ -338,7 +341,9 @@ def create_ui(
|
|
338 |
)
|
339 |
|
340 |
img_but = gr.Button(
|
341 |
-
LOCALES["button"][DEFAULT_LANG]["label"],
|
|
|
|
|
342 |
)
|
343 |
|
344 |
example_images = gr.Examples(
|
|
|
11 |
|
12 |
|
13 |
def load_description(fp):
|
14 |
+
"""
|
15 |
+
加载title.md文件作为Demo的顶部栏
|
16 |
+
"""
|
17 |
with open(fp, "r", encoding="utf-8") as f:
|
18 |
content = f.read()
|
19 |
return content
|
|
|
341 |
)
|
342 |
|
343 |
img_but = gr.Button(
|
344 |
+
LOCALES["button"][DEFAULT_LANG]["label"],
|
345 |
+
elem_id="btn",
|
346 |
+
variant="primary"
|
347 |
)
|
348 |
|
349 |
example_images = gr.Examples(
|