import requests import sys # Define the API endpoint # url = "http://localhost:7680/" # # test_url = "http://localhost:7860/" # response = requests.get(url) # sys.exit() post_url = "http://localhost:7680/api/aadhar_ocr" # post_url = "https://auditedge-optimised-ocr.hf.space/api/aadhar_ocr" # url = "https://auditedge-optimised-ocr.hf.space/" # response = requests.get(url) # print("Status Code:", response.status_code) # print("Response Text:", response.text) # # print() # # Define the file pathscd files = { # "aadhar_file": open("/Users/javed/Downloads/test_images_folder/aadhar/22.jpg", "rb") # "pan_file": open("/Users/javed/Downloads/test_images_folder/pan/fcc.14eb7.jpg", "rb"), # "cheque_file": open("/Users/javed/Downloads/test_images_folder/cheque/2.jpeg", "rb"), "gst_file": open("/Users/javed/Downloads/test_images_folder/gst/e.2.pdf", "rb") # "gst_file": open("/Users/javed/Downloads/test_images_folder/gst/x.pdf", "rb") } response = requests.post(post_url, files=files) # # Print the response print("Status Code:", response.status_code) print("Response Text:", response.text)