Update my_model/utilities/gen_utilities.py
Browse files
my_model/utilities/gen_utilities.py
CHANGED
@@ -275,19 +275,22 @@ def get_image_path(name, path_type):
|
|
275 |
|
276 |
def get_model_path(model_name):
|
277 |
"""
|
278 |
-
Get the path to the '
|
|
|
|
|
|
|
279 |
|
280 |
Returns:
|
281 |
-
str: Absolute path to the
|
282 |
"""
|
283 |
# Directory of the current script
|
284 |
current_script_dir = os.path.dirname(os.path.abspath(__file__))
|
285 |
|
286 |
-
# Directory of the '
|
287 |
-
|
288 |
|
289 |
# Path to the 'models/{model_name}' folder
|
290 |
-
model_path = os.path.join(
|
291 |
|
292 |
return model_path
|
293 |
|
|
|
275 |
|
276 |
def get_model_path(model_name):
|
277 |
"""
|
278 |
+
Get the path to the specified model within the 'models' folder.
|
279 |
+
|
280 |
+
Args:
|
281 |
+
model_name (str): The name of the model file.
|
282 |
|
283 |
Returns:
|
284 |
+
str: Absolute path to the specified model file.
|
285 |
"""
|
286 |
# Directory of the current script
|
287 |
current_script_dir = os.path.dirname(os.path.abspath(__file__))
|
288 |
|
289 |
+
# Directory of the 'my_model' folder (parent of the 'utilities' folder)
|
290 |
+
my_model_dir = os.path.dirname(current_script_dir)
|
291 |
|
292 |
# Path to the 'models/{model_name}' folder
|
293 |
+
model_path = os.path.join(my_model_dir, "models", model_name)
|
294 |
|
295 |
return model_path
|
296 |
|