[email protected]
commited on
Commit
Β·
14b71a9
1
Parent(s):
79c9471
edit codes
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def get_text_file(docs):
|
|
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.
|
@@ -49,17 +49,17 @@ def get_csv_file(docs):
|
|
49 |
with open(temp_filepath3, "wb") as f:
|
50 |
f.write(docs.getvalue())
|
51 |
|
52 |
-
csv_data = []
|
53 |
-
with open(temp_filepath3, "r") as csv_file:
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
return csv_data
|
64 |
|
65 |
def get_json_file(docs):
|
|
|
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.
|
|
|
49 |
with open(temp_filepath3, "wb") as f:
|
50 |
f.write(docs.getvalue())
|
51 |
|
52 |
+
# csv_data = []
|
53 |
+
# with open(temp_filepath3, "r") as csv_file:
|
54 |
+
# csv_reader = csv.reader(csv_file)
|
55 |
+
# for row in csv_reader:
|
56 |
+
# csv_data.append(row)
|
57 |
+
csv_loader = CSVLoader(
|
58 |
+
file_path=temp_filepath3,
|
59 |
+
cs_schema='.data[].address',
|
60 |
+
text_content=False
|
61 |
+
)
|
62 |
+
csv_data = csv_loader.load()
|
63 |
return csv_data
|
64 |
|
65 |
def get_json_file(docs):
|