Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,14 +31,7 @@ def get_csv_file(docs):
|
|
31 |
pass
|
32 |
|
33 |
def get_json_file(docs):
|
34 |
-
|
35 |
-
data = json.loads(Path(file_path).read_text())
|
36 |
-
|
37 |
-
loader = JSONLoader(
|
38 |
-
file_path='./example_data/facebook_chat.json',
|
39 |
-
jq_schema='.messages[].content',
|
40 |
-
text_content=False)
|
41 |
-
|
42 |
data = loader.load()
|
43 |
return data
|
44 |
|
|
|
31 |
pass
|
32 |
|
33 |
def get_json_file(docs):
|
34 |
+
loader = JSONLoader(docs, jq_schema='.messages[].content', text_content=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
data = loader.load()
|
36 |
return data
|
37 |
|