root commited on
Commit
31fbf45
1 Parent(s): c7b72f4

Front-Back connect test

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -130,9 +130,10 @@ def img2img(*args):
130
 
131
  # 处理image
132
  for i, item in enumerate(args):
133
- print(type(item))
134
- if type(item) == numpy.ndarray:
135
- args[i] = item.tolist()
 
136
 
137
  url = "http://flagart.baai.ac.cn/api/img2img/"
138
  d = {"data":args}
 
130
 
131
  # 处理image
132
  for i, item in enumerate(args):
133
+ # print(type(item))
134
+ if type(item) == dict:
135
+ args[i]['image'] = item['image'].tolist()
136
+ args[i]['mask'] = item['mask'].tolist()
137
 
138
  url = "http://flagart.baai.ac.cn/api/img2img/"
139
  d = {"data":args}