Yaron Koresh commited on
Commit
d78e1f7
·
verified ·
1 Parent(s): 2e2dc95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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
- #from torch.multiprocessing import Pool
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
- #_dynamo.config.suppress_errors = True
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()