dlxj commited on
Commit ·
db719a3
1
Parent(s): 145407d
https 改造
Browse files- post.py +2 -2
- readme.txt +3 -0
post.py
CHANGED
|
@@ -9,7 +9,7 @@ import os
|
|
| 9 |
def test_ppocr():
|
| 10 |
# Configuration
|
| 11 |
# url = "http://127.0.0.1:8889/ppocr"
|
| 12 |
-
url = "
|
| 13 |
image_path = r"data/SWX0005_00000_00001.webp"
|
| 14 |
|
| 15 |
# Check if image exists
|
|
@@ -33,7 +33,7 @@ def test_ppocr():
|
|
| 33 |
|
| 34 |
# Send request
|
| 35 |
print(f"Sending POST request to {url}...")
|
| 36 |
-
response = requests.post(url, json=payload, headers=headers)
|
| 37 |
|
| 38 |
# Print result
|
| 39 |
print(f"Status Code: {response.status_code}")
|
|
|
|
| 9 |
def test_ppocr():
|
| 10 |
# Configuration
|
| 11 |
# url = "http://127.0.0.1:8889/ppocr"
|
| 12 |
+
url = "https://127.0.0.1:9346/ppocrv6"
|
| 13 |
image_path = r"data/SWX0005_00000_00001.webp"
|
| 14 |
|
| 15 |
# Check if image exists
|
|
|
|
| 33 |
|
| 34 |
# Send request
|
| 35 |
print(f"Sending POST request to {url}...")
|
| 36 |
+
response = requests.post(url, json=payload, headers=headers, verify=False)
|
| 37 |
|
| 38 |
# Print result
|
| 39 |
print(f"Status Code: {response.status_code}")
|
readme.txt
CHANGED
|
@@ -2,6 +2,9 @@
|
|
| 2 |
run_https.ps1
|
| 3 |
运行,自动解决 CF Pages 访问本地 https OCR 服务
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
.venv/Scripts/python main_v6.py
|
| 7 |
.venv/Scripts/python post.py
|
|
|
|
| 2 |
run_https.ps1
|
| 3 |
运行,自动解决 CF Pages 访问本地 https OCR 服务
|
| 4 |
|
| 5 |
+
.venv/Scripts/python post.py
|
| 6 |
+
https post 测试接口
|
| 7 |
+
|
| 8 |
|
| 9 |
.venv/Scripts/python main_v6.py
|
| 10 |
.venv/Scripts/python post.py
|