Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files- myinfer_latest.py +2 -2
myinfer_latest.py
CHANGED
@@ -25,7 +25,7 @@ from pydub import AudioSegment
|
|
25 |
import uuid
|
26 |
from threading import Semaphore
|
27 |
from threading import Lock
|
28 |
-
from multiprocessing import Process, Queue
|
29 |
|
30 |
|
31 |
|
@@ -47,7 +47,7 @@ MAX_CONCURRENT_REQUESTS = 2 # Adjust this number as needed
|
|
47 |
# Initialize the semaphore with the maximum number of concurrent requests
|
48 |
request_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
|
49 |
|
50 |
-
|
51 |
from lib.infer_pack.models import (
|
52 |
SynthesizerTrnMs256NSFsid,
|
53 |
SynthesizerTrnMs256NSFsid_nono,
|
|
|
25 |
import uuid
|
26 |
from threading import Semaphore
|
27 |
from threading import Lock
|
28 |
+
from multiprocessing import Process, Queue, set_start_method
|
29 |
|
30 |
|
31 |
|
|
|
47 |
# Initialize the semaphore with the maximum number of concurrent requests
|
48 |
request_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
|
49 |
|
50 |
+
set_start_method('spawn', force=True)
|
51 |
from lib.infer_pack.models import (
|
52 |
SynthesizerTrnMs256NSFsid,
|
53 |
SynthesizerTrnMs256NSFsid_nono,
|