adpro commited on
Commit
9a3bb84
·
1 Parent(s): 37245dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,7 +17,7 @@ url = "http://54.91.63.201:80"
17
  print('=='*20)
18
  print(os.system("hostname -i"))
19
 
20
- def url_requests(req_list):
21
  img_list = []
22
  res_list = grequests.map(req_list)
23
  for resp in res_list:
@@ -27,7 +27,7 @@ def url_requests(req_list):
27
  img_byte = base64.b64decode(img_str)
28
  img_io = BytesIO(img_byte) # convert image to file-like object
29
  img = Image.open(img_io) # img is now PIL Image object
30
- _img = img.resize((source_img.size))
31
  img_list.append(_img)
32
 
33
  return img_list
@@ -53,7 +53,7 @@ def img2img_generate(source_img, prompt, steps=25, strength=0.75, seed=42, guida
53
  grequests.post(url, data=json.dumps(data)),
54
  grequests.post(url, data=json.dumps(data)),
55
  ]
56
- img_list = url_requests(req_list)
57
 
58
  return img_list
59
 
 
17
  print('=='*20)
18
  print(os.system("hostname -i"))
19
 
20
+ def url_requests(req_list,sizeImg):
21
  img_list = []
22
  res_list = grequests.map(req_list)
23
  for resp in res_list:
 
27
  img_byte = base64.b64decode(img_str)
28
  img_io = BytesIO(img_byte) # convert image to file-like object
29
  img = Image.open(img_io) # img is now PIL Image object
30
+ _img = img.resize((sizeImg))
31
  img_list.append(_img)
32
 
33
  return img_list
 
53
  grequests.post(url, data=json.dumps(data)),
54
  grequests.post(url, data=json.dumps(data)),
55
  ]
56
+ img_list = url_requests(req_list,source_img.size)
57
 
58
  return img_list
59