selfitcamera
commited on
Commit
·
b4297d4
1
Parent(s):
eebc5e4
init
Browse files
app.py
CHANGED
|
@@ -67,6 +67,7 @@ def onClick(temp_image, user_image, caption_text, token_text,
|
|
| 67 |
return None, info
|
| 68 |
|
| 69 |
# 上传用户照片
|
|
|
|
| 70 |
upload_url, uploadm_url = upload_user_img_mask(client_ip, user_image, user_mask)
|
| 71 |
if len(upload_url)==0:
|
| 72 |
yield None, "fail to upload"
|
|
@@ -74,6 +75,7 @@ def onClick(temp_image, user_image, caption_text, token_text,
|
|
| 74 |
|
| 75 |
# return
|
| 76 |
# 发布任务
|
|
|
|
| 77 |
taskId = publicSelfitTask(upload_url, uploadm_url, temp_image,
|
| 78 |
caption_text, param4_text, param5_text)
|
| 79 |
if not taskId:
|
|
@@ -82,6 +84,7 @@ def onClick(temp_image, user_image, caption_text, token_text,
|
|
| 82 |
|
| 83 |
max_try = 30
|
| 84 |
wait_s = 3
|
|
|
|
| 85 |
# time.sleep(2)
|
| 86 |
for i in range(max_try):
|
| 87 |
time.sleep(wait_s)
|
|
|
|
| 67 |
return None, info
|
| 68 |
|
| 69 |
# 上传用户照片
|
| 70 |
+
yield None, "start to upload, please wait..."
|
| 71 |
upload_url, uploadm_url = upload_user_img_mask(client_ip, user_image, user_mask)
|
| 72 |
if len(upload_url)==0:
|
| 73 |
yield None, "fail to upload"
|
|
|
|
| 75 |
|
| 76 |
# return
|
| 77 |
# 发布任务
|
| 78 |
+
yield None, "start to public, please wait..."
|
| 79 |
taskId = publicSelfitTask(upload_url, uploadm_url, temp_image,
|
| 80 |
caption_text, param4_text, param5_text)
|
| 81 |
if not taskId:
|
|
|
|
| 84 |
|
| 85 |
max_try = 30
|
| 86 |
wait_s = 3
|
| 87 |
+
yield None, "start to process, please wait..."
|
| 88 |
# time.sleep(2)
|
| 89 |
for i in range(max_try):
|
| 90 |
time.sleep(wait_s)
|