Yaron Koresh commited on
Commit
925f1f3
·
verified ·
1 Parent(s): e3f26d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -194,12 +194,12 @@ def run(p1,p2,*result):
194
  print("Starting pool!")
195
  with Pool(ln) as pool:
196
  out1 = pool.imap(infer1,arr1)
197
- lst = list(out1)
198
  arr2 = [{"a":p1_en,"b":p2_en,"c":lst[_]} for _ in rng]
199
  out2 = None
200
  with Pool(ln) as pool:
201
  out2 = pool.imap(infer2,arr2)
202
- return list(out2)
203
 
204
  def ui():
205
  with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
 
194
  print("Starting pool!")
195
  with Pool(ln) as pool:
196
  out1 = pool.imap(infer1,arr1)
197
+ lst = list(out1.get())
198
  arr2 = [{"a":p1_en,"b":p2_en,"c":lst[_]} for _ in rng]
199
  out2 = None
200
  with Pool(ln) as pool:
201
  out2 = pool.imap(infer2,arr2)
202
+ return list(out2.get())
203
 
204
  def ui():
205
  with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo: