Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import requests
|
|
8 |
import gradio as gr
|
9 |
import numpy as np
|
10 |
from lxml.html import fromstring
|
11 |
-
from pathos.
|
12 |
#from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler
|
13 |
from diffusers.pipelines.flux import FluxPipeline
|
14 |
#from diffusers.utils import export_to_gif
|
@@ -184,7 +184,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
184 |
idxs = list(range(ln))
|
185 |
p1s = [p1_en for _ in idxs]
|
186 |
p2s = [p2_en for _ in idxs]
|
187 |
-
return list(Pool(ln).
|
188 |
run_button.click(fn=_rets,inputs=[prompt,prompt2],outputs=result)
|
189 |
|
190 |
demo.queue().launch()
|
|
|
8 |
import gradio as gr
|
9 |
import numpy as np
|
10 |
from lxml.html import fromstring
|
11 |
+
from pathos.threading import ThreadPool as Pool
|
12 |
#from diffusers import DiffusionPipeline, AnimateDiffPipeline, MotionAdapter, EulerDiscreteScheduler
|
13 |
from diffusers.pipelines.flux import FluxPipeline
|
14 |
#from diffusers.utils import export_to_gif
|
|
|
184 |
idxs = list(range(ln))
|
185 |
p1s = [p1_en for _ in idxs]
|
186 |
p2s = [p2_en for _ in idxs]
|
187 |
+
return list(Pool(ln).imap( _ret, idxs, p1s, p2s ))
|
188 |
run_button.click(fn=_rets,inputs=[prompt,prompt2],outputs=result)
|
189 |
|
190 |
demo.queue().launch()
|