Thback commited on
Commit
d641603
Β·
1 Parent(s): d372ba9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,11 +33,11 @@ def get_text_file(text_docs):
33
  temp_filepath = os.path.join(temp_dir.name, "temp_file.txt")
34
 
35
  # ν…μŠ€νŠΈ λ¬Έμ„œμ˜ λ‚΄μš©μ„ μž„μ‹œ νŒŒμΌμ— μ”λ‹ˆλ‹€.
36
- with open(temp_filepath, "w", encoding="utf-8") as f:
37
  f.write(text_docs.getvalue())
38
 
39
  # μž„μ‹œ νŒŒμΌμ—μ„œ ν…μŠ€νŠΈλ₯Ό μ½μ–΄μ˜΅λ‹ˆλ‹€.
40
- with open(temp_filepath, "r", encoding="utf-8") as f:
41
  text_content = f.read()
42
 
43
  # μž„μ‹œ 디렉토리λ₯Ό μžλ™μœΌλ‘œ μ •λ¦¬ν•©λ‹ˆλ‹€.
 
33
  temp_filepath = os.path.join(temp_dir.name, "temp_file.txt")
34
 
35
  # ν…μŠ€νŠΈ λ¬Έμ„œμ˜ λ‚΄μš©μ„ μž„μ‹œ νŒŒμΌμ— μ”λ‹ˆλ‹€.
36
+ with open(temp_filepath, "w", encoding="ascii", errors="ignore") as f:
37
  f.write(text_docs.getvalue())
38
 
39
  # μž„μ‹œ νŒŒμΌμ—μ„œ ν…μŠ€νŠΈλ₯Ό μ½μ–΄μ˜΅λ‹ˆλ‹€.
40
+ with open(temp_filepath, "r", encoding="ascii", errors="ignore") as f:
41
  text_content = f.read()
42
 
43
  # μž„μ‹œ 디렉토리λ₯Ό μžλ™μœΌλ‘œ μ •λ¦¬ν•©λ‹ˆλ‹€.