Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -197,8 +197,10 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
197 |
return v
|
198 |
def _rets(p1,p2):
|
199 |
ln = len(result)
|
200 |
-
idxs =
|
201 |
-
|
|
|
|
|
202 |
run_button.click(fn=_rets,inputs=[prompt,prompt2],outputs=result)
|
203 |
|
204 |
demo.queue().launch()
|
|
|
197 |
return v
|
198 |
def _rets(p1,p2):
|
199 |
ln = len(result)
|
200 |
+
idxs = list(range(ln))
|
201 |
+
p1s = [p1 for _ in idxs]
|
202 |
+
p2s = [p2 for _ in idxs]
|
203 |
+
return list(Pool(ln).imap( _ret, idxs, p1s, p2s ))
|
204 |
run_button.click(fn=_rets,inputs=[prompt,prompt2],outputs=result)
|
205 |
|
206 |
demo.queue().launch()
|