This commit is contained in:
Yaojia Wang
2025-10-26 20:41:11 +01:00
commit dafa86c588
11 changed files with 1171 additions and 0 deletions

14
test_api.py Normal file
View File

@@ -0,0 +1,14 @@
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))