Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -251,8 +251,7 @@ def parallel(timeout,*pairs):
|
|
251 |
for pair in pairs:
|
252 |
f = pair.pop(0)
|
253 |
queue.put(Command(f, pair))
|
254 |
-
|
255 |
-
return response
|
256 |
|
257 |
# functionality
|
258 |
|
@@ -355,14 +354,13 @@ def handle(*inp):
|
|
355 |
|
356 |
parargs = [[calc,*inp] for i in range(ln)]
|
357 |
out_pipe = parallel(5,parargs)
|
358 |
-
|
359 |
-
|
360 |
-
for i in range(ln):
|
361 |
name = generate_random_string(12)+".png"
|
362 |
-
export_to_gif(
|
363 |
-
|
364 |
|
365 |
-
return
|
366 |
|
367 |
def ui():
|
368 |
global result
|
|
|
251 |
for pair in pairs:
|
252 |
f = pair.pop(0)
|
253 |
queue.put(Command(f, pair))
|
254 |
+
return iter(queue.get(timeout=timeout))
|
|
|
255 |
|
256 |
# functionality
|
257 |
|
|
|
354 |
|
355 |
parargs = [[calc,*inp] for i in range(ln)]
|
356 |
out_pipe = parallel(5,parargs)
|
357 |
+
let names = []
|
358 |
+
for i in out_pipe:
|
|
|
359 |
name = generate_random_string(12)+".png"
|
360 |
+
export_to_gif(i.frames[0],name,fps=fps)
|
361 |
+
names.append( name )
|
362 |
|
363 |
+
return names
|
364 |
|
365 |
def ui():
|
366 |
global result
|