diff --git a/src/choose_sentence.py b/src/choose_sentence.py index 7691f7b..c52511a 100644 --- a/src/choose_sentence.py +++ b/src/choose_sentence.py @@ -11,7 +11,7 @@ load_dotenv() _sentences=[] try: sentence_files=[] - + if os.environ.get("SENTENCES_FILE") and os.path.isfile(os.environ["SENTENCES_FILE"]): sentence_files.append(os.environ["SENTENCE_FILES"]) @@ -23,7 +23,7 @@ try: if os.environ.get("SENTENCES_DIRECTORIES"): # 원라인 똥 뿌직(터져도 책임 안짐) - sentence_files.extend([glob(f"{_dir}*.txt") for _dir in filter(os.path.isdir, json.loads(os.environ["SENTENCES_DIRECTORIES"]))]) + sentence_files.extend([glob(f"{_dir}*.txt") for _dir in filter(os.path.isdir, json.loads(os.environ["SENTENCES_DIRECTORIES"]))][0]) for sentence_file in sentence_files: with open(sentence_file, "r") as f: