Skip to content

Commit 226def8

Browse files
authored
Update DialogTag.py
1 parent e1ac311 commit 226def8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dialog_tag/DialogTag.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313

1414
class DialogTag:
15-
def __init__(self, model_name):
15+
def __init__(self, model_name, model_path=None):
1616

1717
self.__model_name = model_name
1818

1919
self.__lib_path = f"{str(Path.home())}"+ model_location["MODEL"]
20-
self.__model_path = os.path.join(self.__lib_path, self.__model_name)
21-
self.__label_mapping_path = os.path.join(self.__lib_path, self.__model_name) + model_location["label_mapping"]
20+
self.__model_path = model_path or os.path.join(self.__lib_path, self.__model_name)
21+
self.__label_mapping_path = self.__model_path + model_location["label_mapping"]
2222

2323
# print(self.__lib_path, self.__model_path, self.__label_mapping_path)
2424
path_exists = os.path.exists(self.__model_path)

0 commit comments

Comments
 (0)