Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import numpy as np
|
|
10 |
from lxml.html import fromstring
|
11 |
from diffusers import AutoPipelineForText2Image
|
12 |
#from tempfile import NamedTemporaryFile
|
13 |
-
from pathos.multiprocessing import Pool
|
14 |
|
15 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
16 |
#model_id = "kandinsky-community/kandinsky-3"
|
@@ -193,7 +193,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
193 |
def ret(idx):
|
194 |
result[idx] = infer(prompt,prompt2)
|
195 |
def rets():
|
196 |
-
Pool().map(ret,[
|
197 |
run_button.click(rets)
|
198 |
|
199 |
demo.queue().launch()
|
|
|
10 |
from lxml.html import fromstring
|
11 |
from diffusers import AutoPipelineForText2Image
|
12 |
#from tempfile import NamedTemporaryFile
|
13 |
+
from pathos.multiprocessing import ProcessingPool as Pool
|
14 |
|
15 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
16 |
#model_id = "kandinsky-community/kandinsky-3"
|
|
|
193 |
def ret(idx):
|
194 |
result[idx] = infer(prompt,prompt2)
|
195 |
def rets():
|
196 |
+
Pool().map(ret,[str(i) for i in range(12)])
|
197 |
run_button.click(rets)
|
198 |
|
199 |
demo.queue().launch()
|