Add formula detection service

This commit is contained in:
三洋三洋
2024-06-17 21:03:08 +08:00
parent 0d5cd9a75d
commit 76eeb18b83
2 changed files with 53 additions and 12 deletions

View File

@@ -1,10 +1,12 @@
import requests
url = "http://127.0.0.1:8000/predict"
rec_server_url = "http://127.0.0.1:8000/frec"
det_server_url = "http://127.0.0.1:8000/fdet"
img_path = "/your/image/path/"
with open(img_path, 'rb') as img:
files = {'img': img}
response = requests.post(url, files=files)
response = requests.post(det_server_url, files=files)
# response = requests.post(rec_server_url, files=files)
print(response.text)