Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -250,7 +250,7 @@ def parallel(*pairs):
|
|
250 |
|
251 |
with LaunchAsync(async_main) as queue:
|
252 |
for pair in pairs:
|
253 |
-
f = pair.pop()
|
254 |
queue.put(Command(f, pair))
|
255 |
response = queue.get()
|
256 |
return response
|
@@ -362,9 +362,7 @@ def handle(*inp):
|
|
362 |
|
363 |
ln = len(result)
|
364 |
|
365 |
-
|
366 |
-
return calc()
|
367 |
-
parargs = [[_calc,*inp] for i in range(ln)]
|
368 |
out_pipe = parallel(parargs)
|
369 |
for i in range(ln):
|
370 |
name = generate_random_string(12)+".png"
|
|
|
250 |
|
251 |
with LaunchAsync(async_main) as queue:
|
252 |
for pair in pairs:
|
253 |
+
f = pair.pop(0)
|
254 |
queue.put(Command(f, pair))
|
255 |
response = queue.get()
|
256 |
return response
|
|
|
362 |
|
363 |
ln = len(result)
|
364 |
|
365 |
+
parargs = [[calc,*inp] for i in range(ln)]
|
|
|
|
|
366 |
out_pipe = parallel(parargs)
|
367 |
for i in range(ln):
|
368 |
name = generate_random_string(12)+".png"
|