AntaresGuo commited on
Commit
bfbf3f5
1 Parent(s): c676cce

support v11 version, gen word

Browse files
interface_modules/X2Painting/client_process.py CHANGED
@@ -7,6 +7,8 @@ from utils.data_convert import base64_to_image
7
 
8
 
9
  def send_to_server(word, style_name):
 
 
10
  send_data = server_config.send_data.copy()
11
  # fill send_data
12
  send_data["gen_num"] = 4 #
@@ -17,10 +19,12 @@ def send_to_server(word, style_name):
17
  {
18
  "style": style_name,
19
  "word": word,
 
 
20
  }
21
  }
22
 
23
- # authentication
24
  token = requests.post(server_config.login_url, data=server_config.login_data).json()["access_token"]
25
  # prepare to send
26
  post_addr = server_config.post_addr
@@ -55,3 +59,4 @@ def send_to_server(word, style_name):
55
  loop1_output.append((img, "{}_{}_loop1_images.jpg".format(word, i)))
56
 
57
  return enhance_output + loop1_output
 
 
7
 
8
 
9
  def send_to_server(word, style_name):
10
+
11
+
12
  send_data = server_config.send_data.copy()
13
  # fill send_data
14
  send_data["gen_num"] = 4 #
 
19
  {
20
  "style": style_name,
21
  "word": word,
22
+ "version": "v11", # 版本号,默认v1,
23
+ "platform":"huggingface",
24
  }
25
  }
26
 
27
+ # 鉴权
28
  token = requests.post(server_config.login_url, data=server_config.login_data).json()["access_token"]
29
  # prepare to send
30
  post_addr = server_config.post_addr
 
59
  loop1_output.append((img, "{}_{}_loop1_images.jpg".format(word, i)))
60
 
61
  return enhance_output + loop1_output
62
+