Spaces:
Runtime error
Runtime error
Zengyf-CVer
commited on
Commit
•
64c4b90
1
Parent(s):
579aa53
v03 update
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def parse_args(known=False):
|
|
59 |
parser.add_argument(
|
60 |
"--cls_name",
|
61 |
"-cls",
|
62 |
-
default="./cls_name/
|
63 |
type=str,
|
64 |
help="cls name",
|
65 |
)
|
@@ -192,7 +192,7 @@ def yolo_det(img, device, model_name, inference_size, conf, iou, max_num, model_
|
|
192 |
yaml_index = cls_name.index(".yaml")
|
193 |
cls_name_lang = cls_name[yaml_index - 2:yaml_index]
|
194 |
|
195 |
-
if cls_name_lang == "
|
196 |
# Chinese
|
197 |
textFont = ImageFont.truetype(str(f"{ROOT_PATH}/fonts/SimSun.ttf"), size=FONTSIZE)
|
198 |
elif cls_name_lang in ["en", "ru", "es", "ar"]:
|
|
|
59 |
parser.add_argument(
|
60 |
"--cls_name",
|
61 |
"-cls",
|
62 |
+
default="./cls_name/cls_name_en.yaml",
|
63 |
type=str,
|
64 |
help="cls name",
|
65 |
)
|
|
|
192 |
yaml_index = cls_name.index(".yaml")
|
193 |
cls_name_lang = cls_name[yaml_index - 2:yaml_index]
|
194 |
|
195 |
+
if cls_name_lang == "zh":
|
196 |
# Chinese
|
197 |
textFont = ImageFont.truetype(str(f"{ROOT_PATH}/fonts/SimSun.ttf"), size=FONTSIZE)
|
198 |
elif cls_name_lang in ["en", "ru", "es", "ar"]:
|