Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -149,8 +149,8 @@ if torch.cuda.is_available():
|
|
149 |
else:
|
150 |
power_device = "诪注讘讚 诇讜讙讬"
|
151 |
|
152 |
-
result = []
|
153 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
|
154 |
with gr.Column(elem_id="col-container"):
|
155 |
gr.Markdown(f"""
|
156 |
# 诪讞讜诇诇 转诪讜谞讜转 - {power_device}
|
@@ -191,8 +191,13 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
191 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
192 |
|
193 |
def _ret(idx):
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
196 |
def _rets():
|
197 |
ln = len(result)
|
198 |
idxs = list(range(ln))
|
|
|
149 |
else:
|
150 |
power_device = "诪注讘讚 诇讜讙讬"
|
151 |
|
|
|
152 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
153 |
+
result = []
|
154 |
with gr.Column(elem_id="col-container"):
|
155 |
gr.Markdown(f"""
|
156 |
# 诪讞讜诇诇 转诪讜谞讜转 - {power_device}
|
|
|
191 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
192 |
|
193 |
def _ret(idx):
|
194 |
+
el = result[idx]
|
195 |
+
p1 = prompt.value
|
196 |
+
p2 = prompt2.value
|
197 |
+
print(f'Starting {idx}: {el} {p1} {p2}')
|
198 |
+
v = infer(p1,p2)
|
199 |
+
print(f'Finished {idx}: {v}')
|
200 |
+
el.value=v
|
201 |
def _rets():
|
202 |
ln = len(result)
|
203 |
idxs = list(range(ln))
|