Spaces:
Build error
Build error
Commit ยท
e0f22a9
1
Parent(s): 7368387
Update app.py
Browse files32 unmodified lines3334353637383932 unmodified linestext = extract_text_from_file(file)if text:text_list.append(text)return text_listdef get_csv_file(docs):32 unmodified lines333435363738394041424344454647484932 unmodified linestext = extract_text_from_file(file)if text:text_list.append(text)try:if file.type == 'text/plain':# ํ์ผ์ด .txt์ธ ๊ฒฝ์ฐtext = file.read().decode("utf-8") # ํ์ผ ๋ด์ฉ์ utf-8 ํ์์ผ๋ก ๋์ฝ๋ฉํ์ฌ ํ ์คํธ๋ก ๋ณํํฉ๋๋ค.return textelse:# ํ์ผ์ด .txt๊ฐ ์๋ ๊ฒฝ์ฐ ์ฒ๋ฆฌreturn Noneexcept Exception as e:print(f"An error occurred while extracting text: {e}")return Nonedef get_csv_file(docs):
app.py+11-1