Init
This commit is contained in:
14
test_api.py
Normal file
14
test_api.py
Normal 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))
|
||||
Reference in New Issue
Block a user