image_through_model #49

Merged
brian merged 75 commits from image_through_model into main 2024-10-20 00:10:27 +02:00
2 changed files with 17 additions and 0 deletions
Showing only changes of commit 3560a61277 - Show all commits
+1
View File
@@ -0,0 +1 @@
from .get_model_name import get_model_name
+16
View File
@@ -0,0 +1,16 @@
"""Definition of get_model_name function."""
import logging
from pathlib import Path
def get_model_name(
path: Path,
) -> str:
"""Get model name from model_name file."""
assert isinstance(path, Path)
assert path.exists(), f'{path} does not exist'
with open(file=path, encoding='utf-8') as fh:
model_name = fh.read()
logging.debug('finished')
return model_name