save code
This commit is contained in:
+7
-4
@@ -5,14 +5,15 @@ import base64
|
||||
import time
|
||||
import random
|
||||
|
||||
# url = 'http://mq.aidigifi.meidaojia.com/api/swapHair/v1'
|
||||
url = 'https://693570664882181-http-8801.northwest1.gpugeek.com:8443/api/swapHair/v1'
|
||||
url = 'http://localhost:8801/api/swapHair/v1'
|
||||
# url = 'https://693570664882181-http-8801.northwest1.gpugeek.com:8443/api/swapHair/v1'
|
||||
# url = 'https://692502023221253-http-8801.northwest1.gpugeek.com:8443/api/swapHair/v1'
|
||||
# url = 'https://692493464571909-http-8801.northwest1.gpugeek.com:8443/api/swapHair/v1'
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
data = {
|
||||
# "hair_id": "1907651680352395265",
|
||||
"hair_id": "1907651525024735234",
|
||||
# "hair_id": "1907651525024735234",
|
||||
"hair_id": "1907651680352395265",
|
||||
"task_id": "345564352345",
|
||||
#"user_img_path": "https://cdn.meidaojia.com/ZoeFiles/user2_1_%E5%89%AF%E6%9C%AC.JPG",
|
||||
# "user_img_path": "http://git.xiangsilian.com/imgs/test.jpg",
|
||||
@@ -110,7 +111,9 @@ def image_to_base64(file_path, mime_type=None):
|
||||
# 组合成Data URI格式
|
||||
return f"data:{mime_type};base64,{encoded_string}"
|
||||
|
||||
img64_str = image_to_base64("testuser_8.JPG")
|
||||
# img64_str = image_to_base64("testuser_8.JPG")
|
||||
# img64_str = image_to_base64("aaa.jpg")
|
||||
img64_str = image_to_base64("qwerqwe.jpg")
|
||||
data['user_img_path'] = img64_str
|
||||
|
||||
# 存储所有请求的响应
|
||||
|
||||
Reference in New Issue
Block a user