model_diagnosis / service /src /text_processor.py
Volodimirich's picture
Upload folder using huggingface_hub
5cd3fef verified
Raw
History Blame Contribute Delete
255 Bytes
def to_limit(multi_set: list[str], limit: int = 3) -> list[str]:
if len(multi_set) >= limit:
return multi_set[:limit]
idx = 0
while len(multi_set) < limit:
multi_set.append(multi_set[idx])
idx += 1
return multi_set