Commit
Β·
a9c5456
1
Parent(s):
243ab84
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,8 @@ def get_text_file(docs):
|
|
33 |
# νμΌμ΄ .txtμΈ κ²½μ°
|
34 |
text = file.read().decode("utf-8") # νμΌ λ΄μ©μ utf-8 νμμΌλ‘ λμ½λ©νμ¬ ν
μ€νΈλ‘ λ³νν©λλ€.
|
35 |
text_list.append(text)
|
|
|
|
|
36 |
except Exception as e:
|
37 |
print(f"An error occurred while extracting text: {e}")
|
38 |
continue # μλ¬ λ°μ μ 건λλλλ€.
|
|
|
33 |
# νμΌμ΄ .txtμΈ κ²½μ°
|
34 |
text = file.read().decode("utf-8") # νμΌ λ΄μ©μ utf-8 νμμΌλ‘ λμ½λ©νμ¬ ν
μ€νΈλ‘ λ³νν©λλ€.
|
35 |
text_list.append(text)
|
36 |
+
else:
|
37 |
+
print(f"Skipped file: {file.name} is not a text file.")
|
38 |
except Exception as e:
|
39 |
print(f"An error occurred while extracting text: {e}")
|
40 |
continue # μλ¬ λ°μ μ 건λλλλ€.
|