Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -194,12 +194,12 @@ def run(p1,p2,*result):
|
|
194 |
print("Starting pool!")
|
195 |
with Pool(ln) as pool1:
|
196 |
out1 = pool1.map(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 pool2:
|
201 |
out2 = pool2.map(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 pool1:
|
196 |
out1 = pool1.map(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 pool2:
|
201 |
out2 = pool2.map(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:
|