Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import gradio as gr
|
|
9 |
import numpy as np
|
10 |
from lxml.html import fromstring
|
11 |
from transformers import pipeline
|
12 |
-
|
13 |
#from pathos.multiprocessing import ProcessPool as Pool
|
14 |
from pathos.threading import ThreadPool as Pool
|
15 |
#from diffusers.pipelines.flux import FluxPipeline
|
@@ -242,6 +242,5 @@ def ui():
|
|
242 |
|
243 |
if __name__ == "__main__":
|
244 |
port_inc()
|
245 |
-
|
246 |
-
#mp.set_start_method("spawn", force=True)
|
247 |
ui()
|
|
|
9 |
import numpy as np
|
10 |
from lxml.html import fromstring
|
11 |
from transformers import pipeline
|
12 |
+
from torch import multiprocessing as mp
|
13 |
#from pathos.multiprocessing import ProcessPool as Pool
|
14 |
from pathos.threading import ThreadPool as Pool
|
15 |
#from diffusers.pipelines.flux import FluxPipeline
|
|
|
242 |
|
243 |
if __name__ == "__main__":
|
244 |
port_inc()
|
245 |
+
mp.set_start_method("spawn", force=True)
|
|
|
246 |
ui()
|