Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
β’
0a4e5b0
1
Parent(s):
5ae388f
app.py
CHANGED
@@ -13,9 +13,6 @@ from langchain.llms import HuggingFaceHub, LlamaCpp, CTransformers # For loadin
|
|
13 |
from langchain.document_loaders import PyPDFLoader, TextLoader, JSONLoader, CSVLoader
|
14 |
import tempfile # μμ νμΌμ μμ±νκΈ° μν λΌμ΄λΈλ¬λ¦¬μ
λλ€.
|
15 |
import os
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
# PDF λ¬Έμλ‘λΆν° ν
μ€νΈλ₯Ό μΆμΆνλ ν¨μμ
λλ€.
|
20 |
def get_pdf_text(pdf_docs):
|
21 |
temp_dir = tempfile.TemporaryDirectory() # μμ λλ ν 리λ₯Ό μμ±ν©λλ€.
|
@@ -59,7 +56,8 @@ def get_json_file(json_docs):
|
|
59 |
|
60 |
json_loader = JSONLoader(
|
61 |
file_path = temp_filepath,
|
62 |
-
jq_schema = '.'
|
|
|
63 |
)
|
64 |
json_doc = json_loader.load()
|
65 |
return json_doc
|
|
|
13 |
from langchain.document_loaders import PyPDFLoader, TextLoader, JSONLoader, CSVLoader
|
14 |
import tempfile # μμ νμΌμ μμ±νκΈ° μν λΌμ΄λΈλ¬λ¦¬μ
λλ€.
|
15 |
import os
|
|
|
|
|
|
|
16 |
# PDF λ¬Έμλ‘λΆν° ν
μ€νΈλ₯Ό μΆμΆνλ ν¨μμ
λλ€.
|
17 |
def get_pdf_text(pdf_docs):
|
18 |
temp_dir = tempfile.TemporaryDirectory() # μμ λλ ν 리λ₯Ό μμ±ν©λλ€.
|
|
|
56 |
|
57 |
json_loader = JSONLoader(
|
58 |
file_path = temp_filepath,
|
59 |
+
jq_schema = '.',
|
60 |
+
text_content=False
|
61 |
)
|
62 |
json_doc = json_loader.load()
|
63 |
return json_doc
|