AuditEdge commited on
Commit
8538469
·
1 Parent(s): 30301eb

made changes in sample.py

Browse files
Files changed (1) hide show
  1. sample.py +15 -5
sample.py CHANGED
@@ -1,18 +1,28 @@
1
  import requests
 
2
 
3
  # Define the API endpoint
4
  # url = "http://127.0.0.0:7860/api/home"
 
 
 
 
 
 
 
 
 
 
5
 
6
- post_url = "http://localhost:7860/api/aadhar_ocr"
7
  # response = requests.get(url)
8
 
9
  # print()
10
  # Define the file pathscd
11
  files = {
12
- "aadhar_file": open("/home/javmulla/model_one/test_images_aadhar/test_two.jpg", "rb"),
13
- "pan_file": open("/home/javmulla/model_one/test_images_pan/6ea33087.jpeg", "rb"),
14
- "cheque_file": open("/home/javmulla/model_one/test_images_cheque/0f81678a.jpeg", "rb"),
15
- "gst_file": open("/home/javmulla/model_one/test_images_gst/0a52fbcb_page3_image_0.jpg", "rb"),
16
  }
17
 
18
  response = requests.post(post_url, files=files)
 
1
  import requests
2
+ import sys
3
 
4
  # Define the API endpoint
5
  # url = "http://127.0.0.0:7860/api/home"
6
+ test_url = "http://127.0.0.1:7860/"
7
+
8
+ response = requests.get(test_url)
9
+
10
+ post_url = "http://127.0.0.1:7860/api/aadhar_ocr"
11
+ print("Status Code:", response.status_code)
12
+ print("Response Text:", response.text)
13
+
14
+ sys.exit()
15
+
16
 
 
17
  # response = requests.get(url)
18
 
19
  # print()
20
  # Define the file pathscd
21
  files = {
22
+ "aadhar_file": open("/Users/javed/Downloads/test_images_folder/aadhar/22.jpg", "rb")
23
+ # "pan_file": open("/Users/javed/model_one/test_images_pan/6ea33087.jpeg", "rb"),
24
+ # "cheque_file": open("/Users/javed/model_one/test_images_cheque/0f81678a.jpeg", "rb"),
25
+ # "gst_file": open("/Users/javed/model_one/test_images_gst/0a52fbcb_page3_image_0.jpg", "rb"),
26
  }
27
 
28
  response = requests.post(post_url, files=files)