selfitcamera
commited on
Commit
•
6a2fb7b
1
Parent(s):
7c94e23
setup
Browse files
app.py
CHANGED
@@ -69,11 +69,12 @@ def onLoad(request: gr.Request):
|
|
69 |
print(infs)
|
70 |
for i, inf in enumerate(infs):
|
71 |
if i>4: continue
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
his_datas[i*2] = f"
|
76 |
-
his_datas[i*2
|
|
|
77 |
|
78 |
# his_datas[i*2] = inf['pose']
|
79 |
# his_datas[i*2+1] = inf['res']
|
@@ -143,32 +144,32 @@ with gr.Blocks(css=css) as demo:
|
|
143 |
|
144 |
with gr.Tab('history'):
|
145 |
with gr.Row():
|
146 |
-
his_pose_image1 = gr.
|
147 |
-
his_res_image1 = gr.
|
148 |
# his_pose_image1 = gr.Image(label="pose image1", interactive=False)
|
149 |
# his_res_image1 = gr.Image(label="result image1", interactive=False)
|
150 |
|
151 |
with gr.Row():
|
152 |
-
his_pose_image2 = gr.
|
153 |
-
his_res_image2 = gr.
|
154 |
# his_pose_image2 = gr.Image(label="pose image2", interactive=False)
|
155 |
# his_res_image2 = gr.Image(label="result image2", interactive=False)
|
156 |
|
157 |
with gr.Row():
|
158 |
-
his_pose_image3 = gr.
|
159 |
-
his_res_image3 = gr.
|
160 |
# his_pose_image3 = gr.Image(label="pose image3", interactive=False)
|
161 |
# his_res_image3 = gr.Image(label="result image3", interactive=False)
|
162 |
|
163 |
with gr.Row():
|
164 |
-
his_pose_image4 = gr.
|
165 |
-
his_res_image4 = gr.
|
166 |
# his_pose_image4 = gr.Image(label="pose image4", interactive=False)
|
167 |
# his_res_image4 = gr.Image(label="result image4", interactive=False)
|
168 |
|
169 |
with gr.Row():
|
170 |
-
his_pose_image5 = gr.
|
171 |
-
his_res_image5 = gr.
|
172 |
# his_pose_image5 = gr.Image(label="pose image5", interactive=False)
|
173 |
# his_res_image5 = gr.Image(label="result image5", interactive=False)
|
174 |
|
|
|
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']})"
|
77 |
+
# his_datas[i*2+1] = f"![]({inf['res']})"
|
78 |
|
79 |
# his_datas[i*2] = inf['pose']
|
80 |
# his_datas[i*2+1] = inf['res']
|
|
|
144 |
|
145 |
with gr.Tab('history'):
|
146 |
with gr.Row():
|
147 |
+
his_pose_image1 = gr.HTML()
|
148 |
+
his_res_image1 = gr.HTML()
|
149 |
# his_pose_image1 = gr.Image(label="pose image1", interactive=False)
|
150 |
# his_res_image1 = gr.Image(label="result image1", interactive=False)
|
151 |
|
152 |
with gr.Row():
|
153 |
+
his_pose_image2 = gr.HTML()
|
154 |
+
his_res_image2 = gr.HTML()
|
155 |
# his_pose_image2 = gr.Image(label="pose image2", interactive=False)
|
156 |
# his_res_image2 = gr.Image(label="result image2", interactive=False)
|
157 |
|
158 |
with gr.Row():
|
159 |
+
his_pose_image3 = gr.HTML()
|
160 |
+
his_res_image3 = gr.HTML()
|
161 |
# his_pose_image3 = gr.Image(label="pose image3", interactive=False)
|
162 |
# his_res_image3 = gr.Image(label="result image3", interactive=False)
|
163 |
|
164 |
with gr.Row():
|
165 |
+
his_pose_image4 = gr.HTML()
|
166 |
+
his_res_image4 = gr.HTML()
|
167 |
# his_pose_image4 = gr.Image(label="pose image4", interactive=False)
|
168 |
# his_res_image4 = gr.Image(label="result image4", interactive=False)
|
169 |
|
170 |
with gr.Row():
|
171 |
+
his_pose_image5 = gr.HTML()
|
172 |
+
his_res_image5 = gr.HTML()
|
173 |
# his_pose_image5 = gr.Image(label="pose image5", interactive=False)
|
174 |
# his_res_image5 = gr.Image(label="result image5", interactive=False)
|
175 |
|