selfitcamera commited on
Commit
38175db
1 Parent(s): 6a2fb7b
Files changed (2) hide show
  1. app.py +2 -2
  2. utils.py +5 -2
app.py CHANGED
@@ -69,8 +69,8 @@ def onLoad(request: gr.Request):
69
  print(infs)
70
  for i, inf in enumerate(infs):
71
  if i>4: continue
72
- pose = "https://selfit-deploy-1256039085.cos.ap-shanghai.myqcloud.com/"+inf['pose']
73
- res = "https://selfit-deploy-1256039085.cos.ap-shanghai.myqcloud.com/"+inf['res']
74
  his_datas[i*2] = f"<img src=\"{pose}\" >"
75
  his_datas[i*2+1] = f"<img src=\"{res}\" >"
76
  # his_datas[i*2] = f"![]({inf['pose']})"
 
69
  print(infs)
70
  for i, inf in enumerate(infs):
71
  if i>4: continue
72
+ pose = inf['pose']
73
+ res = inf['res']
74
  his_datas[i*2] = f"<img src=\"{pose}\" >"
75
  his_datas[i*2+1] = f"<img src=\"{res}\" >"
76
  # his_datas[i*2] = f"![]({inf['pose']})"
utils.py CHANGED
@@ -56,8 +56,11 @@ def getAllInfs(apiUrl, openId, apiKey, clientIp):
56
  if 'data' in ret.json():
57
  records = ret.json()['data']['records']
58
  for record in records:
59
- res.append({'pose':OssUrl+record['body_url']+"?thumbnail/768x768>",
60
- 'res':OssUrl+record['showUrl']+"?thumbnail/768x768>"})
 
 
 
61
  return res
62
 
63
 
 
56
  if 'data' in ret.json():
57
  records = ret.json()['data']['records']
58
  for record in records:
59
+ # res.append({'pose':OssUrl+record['body_url']+"?thumbnail/768x768>",
60
+ # 'res':OssUrl+record['showUrl']+"?thumbnail/768x768>"})
61
+ res.append({'pose':OssUrl+record['body_url'],
62
+ 'res':OssUrl+record['showUrl']})
63
+
64
  return res
65
 
66