Spaces:
Running
Running
File size: 915 Bytes
81e13bb 8538469 81e13bb 8538469 81e13bb 8538469 81e13bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import requests
import sys
# Define the API endpoint
# url = "http://127.0.0.0:7860/api/home"
test_url = "http://127.0.0.1:7860/"
response = requests.get(test_url)
post_url = "http://127.0.0.1:7860/api/aadhar_ocr"
print("Status Code:", response.status_code)
print("Response Text:", response.text)
sys.exit()
# response = requests.get(url)
# print()
# Define the file pathscd
files = {
"aadhar_file": open("/Users/javed/Downloads/test_images_folder/aadhar/22.jpg", "rb")
# "pan_file": open("/Users/javed/model_one/test_images_pan/6ea33087.jpeg", "rb"),
# "cheque_file": open("/Users/javed/model_one/test_images_cheque/0f81678a.jpeg", "rb"),
# "gst_file": open("/Users/javed/model_one/test_images_gst/0a52fbcb_page3_image_0.jpg", "rb"),
}
response = requests.post(post_url, files=files)
# # Print the response
print("Status Code:", response.status_code)
print("Response Text:", response.text) |