[email protected]
commited on
Commit
Β·
79c9471
1
Parent(s):
7cd4ae7
edit codes
Browse files
app.py
CHANGED
@@ -35,7 +35,11 @@ def get_text_file(docs):
|
|
35 |
temp_filepath2 = os.path.join(temp_dir2.name, docs.name) # μμ νμΌ κ²½λ‘λ₯Ό μμ±ν©λλ€.
|
36 |
with open(temp_filepath2, "wb") as f: # μμ νμΌμ λ°μ΄λ리 μ°κΈ° λͺ¨λλ‘ μ½λλ€.
|
37 |
f.write(docs.getvalue()) # TXT λ¬Έμμ λ΄μ©μ μμ νμΌμ μλλ€.
|
38 |
-
text_loader = TextLoader(
|
|
|
|
|
|
|
|
|
39 |
text_data = text_loader.load() # Extract text using the loader.
|
40 |
return text_data # μΆμΆν ν
μ€νΈλ₯Ό λ°νν©λλ€.
|
41 |
|
|
|
35 |
temp_filepath2 = os.path.join(temp_dir2.name, docs.name) # μμ νμΌ κ²½λ‘λ₯Ό μμ±ν©λλ€.
|
36 |
with open(temp_filepath2, "wb") as f: # μμ νμΌμ λ°μ΄λ리 μ°κΈ° λͺ¨λλ‘ μ½λλ€.
|
37 |
f.write(docs.getvalue()) # TXT λ¬Έμμ λ΄μ©μ μμ νμΌμ μλλ€.
|
38 |
+
text_loader = TextLoader(
|
39 |
+
file_path=temp_filepath2,
|
40 |
+
txt_schema=' ',
|
41 |
+
text_content=False
|
42 |
+
) # Use your specific text loader here.
|
43 |
text_data = text_loader.load() # Extract text using the loader.
|
44 |
return text_data # μΆμΆν ν
μ€νΈλ₯Ό λ°νν©λλ€.
|
45 |
|