selfitcamera
commited on
Commit
·
0371bab
1
Parent(s):
b9093da
setup
Browse files
app.py
CHANGED
@@ -71,8 +71,12 @@ def onLoad(request: gr.Request):
|
|
71 |
if i>4: continue
|
72 |
pose = inf['pose']
|
73 |
res = inf['res']
|
74 |
-
his_datas[i*2] = f"[pose]({pose})"+f"![pose]({pose})"
|
75 |
-
his_datas[i*2+1] = f"[res]({res})"+f"![res]({res})"
|
|
|
|
|
|
|
|
|
76 |
time.sleep(3)
|
77 |
except Exception as e:
|
78 |
print(e)
|
@@ -138,35 +142,24 @@ with gr.Blocks(css=css) as demo:
|
|
138 |
|
139 |
with gr.Tab('history'):
|
140 |
with gr.Row():
|
141 |
-
his_pose_image1 = gr.
|
142 |
-
his_res_image1 = gr.
|
143 |
-
# his_pose_image1 = gr.Image(label="pose image1", interactive=False)
|
144 |
-
# his_res_image1 = gr.Image(label="result image1", interactive=False)
|
145 |
|
146 |
with gr.Row():
|
147 |
-
his_pose_image2 = gr.
|
148 |
-
his_res_image2 = gr.
|
149 |
-
# his_pose_image2 = gr.Image(label="pose image2", interactive=False)
|
150 |
-
# his_res_image2 = gr.Image(label="result image2", interactive=False)
|
151 |
|
152 |
with gr.Row():
|
153 |
-
his_pose_image3 = gr.
|
154 |
-
his_res_image3 = gr.
|
155 |
-
# his_pose_image3 = gr.Image(label="pose image3", interactive=False)
|
156 |
-
# his_res_image3 = gr.Image(label="result image3", interactive=False)
|
157 |
|
158 |
with gr.Row():
|
159 |
-
his_pose_image4 = gr.
|
160 |
-
his_res_image4 = gr.
|
161 |
-
# his_pose_image4 = gr.Image(label="pose image4", interactive=False)
|
162 |
-
# his_res_image4 = gr.Image(label="result image4", interactive=False)
|
163 |
|
164 |
with gr.Row():
|
165 |
-
his_pose_image5 = gr.
|
166 |
-
his_res_image5 = gr.
|
167 |
-
# his_pose_image5 = gr.Image(label="pose image5", interactive=False)
|
168 |
-
# his_res_image5 = gr.Image(label="result image5", interactive=False)
|
169 |
-
|
170 |
|
171 |
run_button.click(fn=onClick, inputs=[cloth_id, pose_image, pose_id, size_slider],
|
172 |
outputs=[res_image, info_text], concurrency_limit=50)
|
|
|
71 |
if i>4: continue
|
72 |
pose = inf['pose']
|
73 |
res = inf['res']
|
74 |
+
# his_datas[i*2] = f"[pose]({pose})"+f"![pose]({pose})"
|
75 |
+
# his_datas[i*2+1] = f"[res]({res})"+f"![res]({res})"
|
76 |
+
|
77 |
+
his_datas[i*2] = f"<img src=\"{pose}\" >"
|
78 |
+
his_datas[i*2+1] = f"<img src=\"{res}\" >"
|
79 |
+
|
80 |
time.sleep(3)
|
81 |
except Exception as e:
|
82 |
print(e)
|
|
|
142 |
|
143 |
with gr.Tab('history'):
|
144 |
with gr.Row():
|
145 |
+
his_pose_image1 = gr.HTML()
|
146 |
+
his_res_image1 = gr.HTML()
|
|
|
|
|
147 |
|
148 |
with gr.Row():
|
149 |
+
his_pose_image2 = gr.HTML()
|
150 |
+
his_res_image2 = gr.HTML()
|
|
|
|
|
151 |
|
152 |
with gr.Row():
|
153 |
+
his_pose_image3 = gr.HTML()
|
154 |
+
his_res_image3 = gr.HTML()
|
|
|
|
|
155 |
|
156 |
with gr.Row():
|
157 |
+
his_pose_image4 = gr.HTML()
|
158 |
+
his_res_image4 = gr.HTML()
|
|
|
|
|
159 |
|
160 |
with gr.Row():
|
161 |
+
his_pose_image5 = gr.HTML()
|
162 |
+
his_res_image5 = gr.HTML()
|
|
|
|
|
|
|
163 |
|
164 |
run_button.click(fn=onClick, inputs=[cloth_id, pose_image, pose_id, size_slider],
|
165 |
outputs=[res_image, info_text], concurrency_limit=50)
|