Yaron Koresh commited on
Commit
ec62674
·
verified ·
1 Parent(s): a895600

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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 = [ [idx,p1,p2] for idx in list(range(ln)) ]
201
- return list(Pool(ln).imap( _ret, idxs ))
 
 
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()