Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
@@ -400,7 +400,7 @@ def create_documents(data_source: str, data: list) -> list:
|
|
400 |
# Path to your data.json
|
401 |
file_path = "/home/wendy/Downloads/data.json"
|
402 |
|
403 |
-
def load_data(file_path: str) ->
|
404 |
"""Safe JSON data loading with error handling"""
|
405 |
if not os.path.exists(file_path):
|
406 |
raise FileNotFoundError(f"Data file not found: {file_path}")
|
|
|
400 |
# Path to your data.json
|
401 |
file_path = "/home/wendy/Downloads/data.json"
|
402 |
|
403 |
+
def load_data(file_path: str) -> list[dict]:
|
404 |
"""Safe JSON data loading with error handling"""
|
405 |
if not os.path.exists(file_path):
|
406 |
raise FileNotFoundError(f"Data file not found: {file_path}")
|