Spaces:
Sleeping
Sleeping
Download debug_backend.py from ascentialabs/process-aware-ai: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/spaces/ascentialabs/process-aware-ai/resolve/main/debug_backend.py
- Command line
-
hf download hf://spaces/ascentialabs/process-aware-ai/debug_backend.py
-
curl -L -o debug_backend.py https://huggingface.co/spaces/ascentialabs/process-aware-ai/resolve/main/debug_backend.py
778 Bytes
| import sys | |
| import os | |
| import json | |
| sys.path.append("/run/media/ishpreet/New Volume/Auribises/Vardhman Textiles/process-aware-ai/backend") | |
| try: | |
| from app.services.data_service import data_service | |
| print("Loading data...") | |
| data_service.load_data() | |
| # Test with the problematic order | |
| order_id = "81S_81S-25000172" | |
| print(f"\n=== Testing: {order_id} ===") | |
| result = data_service.get_sale_order_details(order_id) | |
| if "error" in result: | |
| print(f"Error: {result['error']}") | |
| else: | |
| print(f"Success! Keys: {list(result.keys())}") | |
| print(f"Metrics: {result['metrics']}") | |
| print(f"Intelligence keys: {list(result['intelligence'].keys())}") | |
| except Exception as e: | |
| import traceback | |
| traceback.print_exc() | |