smjain commited on
Commit
ede5deb
1 Parent(s): b337e42

Upload myinfer_latest.py

Browse files
Files changed (1) hide show
  1. myinfer_latest.py +3 -1
myinfer_latest.py CHANGED
@@ -47,8 +47,9 @@ os.makedirs(tmp, exist_ok=True)
47
  os.environ["TEMP"] = tmp
48
  split_model="htdemucs"
49
  convert_voice_lock = Lock()
 
50
  # Define the maximum number of concurrent requests
51
- MAX_CONCURRENT_REQUESTS = 2 # Adjust this number as needed
52
 
53
  # Initialize the semaphore with the maximum number of concurrent requests
54
  request_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
@@ -63,6 +64,7 @@ app.register_blueprint(google_blueprint, url_prefix="/login")
63
  ACCESS_ID = os.getenv('ACCESS_ID', '')
64
  SECRET_KEY = os.getenv('SECRET_KEY', '')
65
 
 
66
  #set_start_method('spawn', force=True)
67
  from lib.infer_pack.models import (
68
  SynthesizerTrnMs256NSFsid,
 
47
  os.environ["TEMP"] = tmp
48
  split_model="htdemucs"
49
  convert_voice_lock = Lock()
50
+ #concurrent= os.getenv('concurrent', '')
51
  # Define the maximum number of concurrent requests
52
+ MAX_CONCURRENT_REQUESTS = os.getenv('concurrent', '5') # Adjust this number as needed
53
 
54
  # Initialize the semaphore with the maximum number of concurrent requests
55
  request_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
 
64
  ACCESS_ID = os.getenv('ACCESS_ID', '')
65
  SECRET_KEY = os.getenv('SECRET_KEY', '')
66
 
67
+
68
  #set_start_method('spawn', force=True)
69
  from lib.infer_pack.models import (
70
  SynthesizerTrnMs256NSFsid,