23 lines
663 B
Python
23 lines
663 B
Python
import requests
|
|
import json
|
|
|
|
# API_URL = "http://192.168.0.150:7000/translate_image"
|
|
API_URL = "http://127.0.0.1:7002/translate_image"
|
|
|
|
payload = {
|
|
"local_image_path": "d:/py/IT_Server/modules/img/1.jpg",
|
|
"file_prefix": "test",
|
|
"toggle_states": {"ocr": True},
|
|
"unwanted_texts": {"크리스탈": "크리미", "미니멀": "확화곽"},
|
|
"watermark_text": "테스트 워터마크",
|
|
"watermark_opacity": 0.5,
|
|
"watermark_font_size": 32
|
|
}
|
|
|
|
headers = {"Content-Type": "application/json"}
|
|
|
|
response = requests.post(API_URL, data=json.dumps(payload), headers=headers)
|
|
|
|
print("응답 결과:")
|
|
print(response.status_code)
|
|
print(response.json()) |