Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,8 @@ IO_PATTERN = "*.jsonl"
|
|
20 |
|
21 |
def read_jsonl_file(file_path):
|
22 |
"""Read a JSONL file and return a list of dictionaries."""
|
|
|
|
|
23 |
with open(file_path, "r") as f:
|
24 |
lines = f.readlines()
|
25 |
records = [json.loads(line) for line in lines]
|
|
|
20 |
|
21 |
def read_jsonl_file(file_path):
|
22 |
"""Read a JSONL file and return a list of dictionaries."""
|
23 |
+
if not os.path.exists(file_path):
|
24 |
+
return []
|
25 |
with open(file_path, "r") as f:
|
26 |
lines = f.readlines()
|
27 |
records = [json.loads(line) for line in lines]
|