import requests import json # Test the API with the problematic invoice url = "http://127.0.0.1:8000/extract_invoice/" file_path = r"data\processed_images\4BC5E5B3-E561-4A73-BC9C-46D4F08F89C3.png" with open(file_path, 'rb') as f: files = {'file': f} response = requests.post(url, files=files) print("Status Code:", response.status_code) print("\nResponse JSON:") print(json.dumps(response.json(), indent=2, ensure_ascii=False))