Spaces:
Runtime error
Runtime error
DET_MODELS_FILENAME = 'det_models.txt' | |
SEG_MODELS_FILENAME = 'seg_models.txt' | |
CLS_MODELS_FILENAME = 'cls_models.txt' | |
def load_models_from_txt_files(): | |
"""Load models from txt files.""" | |
with open(DET_MODELS_FILENAME, 'r') as file: | |
det_models = [line.strip() for line in file] | |
with open(SEG_MODELS_FILENAME, 'r') as file: | |
seg_models = [line.strip() for line in file] | |
with open(CLS_MODELS_FILENAME, 'r') as file: | |
cls_models = [line.strip() for line in file] | |
return det_models, seg_models, cls_models |